googleauth alternatives and similar modules
Based on the "Command Line Utilities" category.
Alternatively, view googleauth alternatives based on common mentions on social networks and blogs.
-
nvm
Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions -
Inquirer.js
A collection of common interactive command line user interfaces. -
KeyboardJS
A JavaScript library for binding keyboard combos without the pain of key codes and key combo conflicts. -
omelette
Omelette is a simple, template based autocompletion tool for Node and Deno projects with super easy API. (For Bash, Zsh and Fish) -
log-update
Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc. -
configstore
Easily load and persist config without having to think about where and how -
insight
Node.js module to help you understand how your tool is being used by anonymously reporting usage metrics to Google Analytics -
columnify
Create text-based columns suitable for console output. Supports cell wrapping. -
Javascript library for 2d geometry
Javascript library for 2d geometry -
string-width
Get the visual width of a string - the number of columns required to display it -
multispinner
Multiple, simultaneous, individually controllable spinners for concurrent tasks in Node.js CLI programs -
loud-rejection
Make unhandled promise rejections fail loudly instead of the default silent fail -
licenseye
Node.js CLI tool to visualize an aggregate list of your dependencies' licenses -
cron-to-quartz
Node.js library to convert unix or linux CRON syntax to Quartz Scheduler
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of googleauth or a related project?
README
googleauth
Create and refresh a Google OAuth 2.0 authentication token for command-line apps
This module is based on ghauth which does the same thing for GitHub tokens
You can learn about Google tokens here https://developers.google.com/accounts/docs/OAuth2WebServer
To use this you will need to:
- have a google account
- create a new application at the google developers console
- enable an API on your new application (e.g. the gmail API)
- create a new client ID for an "Installed application"
- store the client ID and client secret in a secure location (you will need them to use
googleauth
) - add your email and product name to the "Consent screen" page under the APIs & auth section of your application
- for the API you want to access locate the scope URL. e.g. gmail's scope url for read-only is:
https://www.googleapis.com/auth/gmail.readonly
Example usage
$ npm install googleauth -g
$ googleauth --scope="https://www.googleapis.com/auth/drive" --client_id="foobar" --client_secret="mysecret"
Open the following URL in your browser, then paste the resulting authorization code below:
https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=foobar
Google Authorization Code: weeeeeeeeee
{ access_token: 'foo', token_type: 'Bearer', expires_in: 3600, refresh_token: 'bar' }
Because the refresh token is persisted, the next time you run it there will be no prompts, and a fresh google token will be requested from google every time:
$ googleauth
{ access_token: 'freshtokenhere', token_type: 'Bearer', expires_in: 3600, refresh_token: 'bar' }
Resetting your token
A JSON file will be created when you first get a token at this location:
path.join(process.env.HOME || process.env.USERPROFILE, '.config', 'googleauth.json')
You can simply delete that file to make googleauth
forget about you.
If you change token settings e.g. add/remove scopes you will have to delete this file first so that googleauth
will prompt you for the authentication flow again.
Options
Pass in args using this CLI syntax: googleauth --foo=bar
. You can pass in multiple scope arguments.
- client_id (required)
- client_secret (required)
- scope (required) - authentication scope, googles are usually full URIs
- redirect_uri (default
urn:ietf:wg:oauth:2.0:oob
) - you shouldnt need to change this, the default is what makes google use the CLI login flow - config_path (default
~/.config/googleauth.json
)
Options are only required for authentication. You don't need to pass them in to refresh a token.