This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

google-sign-in

3.0.4 • Public • Published

Deprecation Notice

This package is no longer maintained. Use the official google-auth-library instead.

google-sign-in

node.js library for integrating with Google sign in

google-sign-in on NPM


Installation

npm install google-sign-in

Example Usage

// Initialize a project

var GoogleSignIn = require('google-sign-in');
var project = new GoogleSignIn.Project('your-client-id.apps.googleusercontent.com', 'your-other-client-id.apps.googleusercontent.com');

// Verify a token

project.verifyToken('token').then((jsonData) => {
	console.log(JSON.stringify(jsonData)); // Does not execute
}, (error) => {
	console.error(error.message); // Logs 'Invalid Value'
});

Documentation

Project - Class

  • constructor(clientIds) - constructor - Creates a new Project with the specified clientIds
    • clientIds - required string... - Valid client IDs from the Google Developers project seperated by commas or an array
  • verifyToken(idToken) - function - Verifies an ID token
    • idToken - required string - The ID token to verify
    • returns a promise
      • Rejects with an error object if an error occurs
      • Resolves with a JSON object if everything goes well
        • Documentation on this object can be found here.
  • clientIds - string[] - List of client IDs

Purpose

Making authenticating with Google sign-in easier.

Contributions

To submit issues, use the GitHub issue tracker. To submit code, use a pull request, found here. To issue a private vulnerability report, email a contributor.

CII Best Practices, bitHound standards, Synk, and Jacks standards should be met.

License (MIT)

Copyright 2017 Bennett Somerville

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i google-sign-in

      Weekly Downloads

      66

      Version

      3.0.4

      License

      MIT

      Unpacked Size

      13.1 kB

      Total Files

      10

      Last publish

      Collaborators

      • bdsomer