google-auth-companion
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Google Auth Companion

This plugin concentrated on usage of google identity authentication. Each methods are created to reduce code size of the developer end.

Available Methods

  • invokeOneTap
  • cancelTap
  • disableAutoSelect
  • storeCredential
  • revoke
  • renderGoogleButton

Install

npm install google-auth-companion

Usage

    import { GoogleAuthCompanion } from 'google-auth-companion';

    const googleAuth = new GoogleAuthCompanion();

    googleAuth.initialize({
        clientId: 'YOUR_CLIENT_ID',
        callback: this['YOUR_RESPONSE_HANDLER_METHOD_NAME'],
        ...
    });

    googleAuth.invokeOneTap();

    googleAuth.cancelTap();

    googleAuth.disableAutoSelect();

    googleAuth.storeCredential();

    googleAuth.revoke(loginHint);

    googleAuth.renderGoogleButton({
        clickListener: this['YOUR_METHOD_NAME'],
        buttonContainer: document.getElementById('personalizedButton'),
        style: {
            type: 'standard',
            theme: 'outline',
            size: 'large',
            text: 'signin_with',
            shape: 'rectangular',
            logoAlignment: 'left',
            width: 400
        }
    });

Package Sidebar

Install

npm i google-auth-companion

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

25.2 kB

Total Files

10

Last publish

Collaborators

  • sanjib-kumar-mandal