GithubHelp home page GithubHelp logo

erkiesken / oauth2-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geckoboard/oauth2-cli

0.0 1.0 0.0 1.98 MB

Small CLI utility to get OAuth token for three-leggged flows

License: MIT License

Go 100.00%

oauth2-cli's Introduction

CircleCI

oauth2-cli

This is a small command line utility to get an OAuth access token for three-legged flows where you authorize an application to access your account, such as Strava.

It is useful for other command line utilities where you need an access token but don't want to host the application on the web.

Usage

Install:

go install github.com/geckoboard/oauth2-cli@master

Create an API application in the service of your choosing and set the callback URL to as follows:

http://127.0.0.1:8080/oauth/callback

Run with all of the necessary arguments, for example:

$ oauth2-cli \
  -id REDACTED \
  -secret REDACTED \
  -auth https://www.strava.com/oauth/authorize \
  -token https://www.strava.com/oauth/token \
  -scope view_private

You'll then be given a URL to visit from the CLI output, follow that and any subsequent instructions.

Scopes

Multiple scopes can be given by specifying the argument multiple times:

-scope read \
-scope write \

Some services are lenient with their interpretation of the OAuth specification so you will need to specify multiple scopes as a single comma separated argument:

-scope write,view_private

oauth2-cli's People

Contributors

dcarley avatar glenjamin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.