#open-id #openid-connect #google #credentials #command-line-tool #token #login

app googauth

An application that uses OpenID Connect to sign in to a Google account, and store the credentials locally for ease of use

5 releases (3 breaking)

0.8.1 Feb 10, 2023
0.8.0 Nov 24, 2021
0.7.0 May 13, 2021
0.6.0 Feb 5, 2021
0.5.0 Jan 8, 2021

#688 in Authentication

23 downloads per month

MIT license

33KB
652 lines

googauth

Please see googauth-lib if you want to integrate this tool into your own code.

Features

  • Profiles: save each login in a named profile.
  • Cache: Each profile saves the last access and id token for ease of use.
  • Refresh token: automatically fetches a new (access/id) token if the current one has expired.
  • Pipeable: Most commands are designed to be used as the input to other command line programs by the use of pipes.
  • User friendly: The goal is to provide decent error messages.

Help

Using the help section of the program should get you started.

./googauth help

Login

Use the login command with a profile name and parameter values for all the required parameters.

./googauth login myprofile \
   --scopes "scope1,scope2,scope3" \
   --id "my_client_id" \
   --secret "my_client_secret"

At this point your default browser should start and you can login to your Google account.

If the browser doesn't start, you can use the URL that is printed to the terminal.

Access token

./googauth accesstoken myprofile

<ACCESS TOKEN ON STANDARD OUT>

ID Token

./googauth idtoken myprofile

<ID TOKEN ON STANDARD OUT>

License

MIT

Dependencies

~18–31MB
~572K SLoC