Socket
Socket
Sign inDemoInstall

goauth-cli

Package Overview
Dependencies
3
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    goauth-cli

Dead-simple Google OAuth v2 login for the command line.


Version published
Weekly downloads
445
increased by17.72%
Maintainers
1
Install size
43.8 MB
Created
Weekly downloads
 

Readme

Source

goauth-cli

Dead-simple Google OAuth v2 login for the command line.

Goole OAuth v2 requires that users authenticate with Google via a web interface provided by Google. This tool implements all the steps necessary to get the refresh and access tokens in order to interact with the Google APIs from the command line.

goauth-cli generates the login url and immediately opens a web browser to the correct url. It also starts a temporary webserver to capture the authorization code sent back by Google. Once the login process is complete, the webserver is shutdown.

Install

$ npm i goauth-cli

Usage

import { GoauthCli } from 'goauth-cli'

const auth = new GoauthCli(CLIENT_ID, CLIENT_SECRET, SCOPES)
const authClient = await auth.login()

Login options

  • callbackport: The port that the webserver will listen on. Defaults to a random, available port
  • callbackPath: The callback url path. Defaults to /oauth-callback.

License

Apache License Vesion 2.0

Keywords

FAQs

Last updated on 18 Jun 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc