Socket
Socket
Sign inDemoInstall

sheetgo-react-google-one-tap-sign-in

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sheetgo-react-google-one-tap-sign-in

Sheetgo forking of React wrapper for google one tap authentication


Version published
Maintainers
1
Install size
50.1 kB
Created

Readme

Source

React - Google One Tap Login

Sheetgo forking of React wrapper for google one tap authentication by Muhammad Salman Tariq

Install

npm install react-google-one-tap-login

OR

yarn add react-google-one-tap-login

How to use

As a Hook

import { useGoogleOneTapLogin } from 'react-google-one-tap-login';

useGoogleOneTapLogin({
    onError: error => console.log(error),
    onSuccess: response => console.log(response),
    googleAccountConfigs: {
      client_id: // Your google client id here !!!
    },
  });

As a Component

import React from 'react';
import ReactDOM from 'react-dom';
import GoogleOneTapLogin from 'react-google-one-tap-login';

ReactDOM.render(
  <GoogleOneTapLogin onError={(error) => console.log(error} onSuccess={(response) => console.log(response} googleAccountConfigs={{ client_id: // Your google client id here !!! }} />,
  document.getElementById('root')
);

Props

NameTypeRequiredDescription
disabledbooleanfalseDisable the login prompt
onErrorcallbackfalseonError : Error
onSuccesscallbackfalseonSuccess : GoogleEndpointResponse (See below)
googleAccountConfigsobjecttrueGoogle One Tap JS API Reference
*client_id is required in googleAccountConfigs

Google EndPoint Response

More details

NameType
issstring
supstring
azpstring
audstring
iatstring
expstring
namestring
emailstring
localstring
picturestring
given_namestring
family_namestring
email_verifiedstring

Keywords

FAQs

Last updated on 30 Jul 2021

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