Oauth2 token management for cli applications
Project description
Simple cli tools to create and use oauth2token
Configuration
You need to create config.json
and scopes.json
at
$XDG_CONFIG_HOME/oauth2token/<provider>/
for each provider you want
to use.
config.json
:
See Google client_secret.json.
You’ll need to obtain your own from the provider.
scopes.json
:
The scope your application need as a json array.
Example :
["https://mail.google.com/"]
Usage
oauth2create
<provider> <account>
Obtain and store credentials in $XDG_DATA_HOME/oauth2token/<provider>/<account> in binary form, using the configuration for that provider. It use the “Installed App flow” open a brower where you’ll need to log in the account you want to use, then redirect to the loopback address to obtain the credentials.
oauth2get
<provider> <account>
Output the access token for that account, refreshing it if needed with the associated refresh token.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.