Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

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
Weekly downloads
13
decreased by-38.1%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 26 Jul 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc