#command-line #google #credentials #login #sign #openid #account #store #connect #google-api

app googauth

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

4 releases (breaking)

new 0.8.0 Nov 24, 2021
0.7.0 May 13, 2021
0.6.0 Feb 5, 2021
0.5.0 Jan 8, 2021

#104 in Authentication

32 downloads per month

MIT license

31KB
646 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

~14–19MB
~442K SLoC

a