Skip to content
This repository was archived by the owner on Nov 23, 2023. It is now read-only.
VannTenPublic archive

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

Repository files navigation

# Oauth2token #

Unmaintained

I no longer maintain this, since I don't have any use for it anymore. Feel free to fork if you need o/.

Simple cli tools to create and use oauth2token

Configuration

You need to create config.json and scopes.json at $XDG_CONFIG_HOME/oauth2token// for each provider you want to use.

config.json

The main configuration file. Follow the format on client_secret.json, using your own information obtained from your provider.

Example (Just change the client_id and client_secret values to the ones you got from Google):

{
    "web": {
        "client_id": "asdfjasdljfasdkjf",
        "client_secret": "1912308409123890",
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "token_uri": "https://accounts.google.com/o/oauth2/token"
    }
}

scopes.json

The scope your application needs. It's a json array containing the URLs.

Example :

["https://mail.google.com/"]

Usage

oauth2create

Obtain and store credentials for the account in $XDG_DATA_HOME/oauth2token//, using the configuration for that provider. It opens a browser where you'll need to log in the account you want to use.

oauth2get

Output the access token for that account, refreshing it if needed with the associated refresh token.

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages