Giter Club home page Giter Club logo

gh-device-flow's Introduction

gh-device-flow

Crate that implements the GitHub Device Flow for authenticating with GitHub Apps.

It also implements the refresh mechanism for GitHub Apps that use GitHub's token expiration feature.

Usage

To use the CLI, download the binary for your architecture/OS from the latest release.

Once extracted, execute the command providing the Client ID for your App:

github-device-flow --client-id Iv1.8675309ABCDEFGH

This will prompt you to open a browser window and provide the generated device code. Once completed, your access token will be printed to STDOUT as a JSON object. If your App requests refresh tokens one will also be printed.

To refresh your OAuth Access using a Refresh Token, pass it as a --refresh flag:

github-device-flow --client-id Iv1.8675309ABCDEFGH --refresh thisisnotarefreshtoken

To view the full help, pass the --help flag:

$ github-device-flow --help
github-device-flow 0.1.2
Binary and library for performing the GitHub Device Flow

USAGE:
    github-device-flow [OPTIONS] --client-id <CLIENT_ID>

OPTIONS:
    -c, --client-id <CLIENT_ID>    Client ID
    -h, --host <HOST>              The host to authenticate with
        --help                     Print help information
    -r, --refresh <REFRESH>        A Refresh Token to exchange
    -s, --scope <SCOPE>            The scope required for the auth app
    -V, --version                  Print version information

gh-device-flow's People

Contributors

jakewilkins avatar rhaskia avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

rhaskia

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.