0.0.5 • Published 6 years ago

react-google-onetap v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-google-onetap

A Google one-tap sign-up Component for React

Install

yarn add react-google-onetap

How to use

There're some steps to take to create your custom map components. 1. In order to initialize the MyComponent with the credential, you'll need to wrap it with withCredential HOC. 1. In order to correctly load googleyolo JavaScript client library, you'll need to wrap it with withScriptjs. 1. Notice there're some required props for withCredential and withScriptjs HOC.

import { withScriptjs, withCredential } from "react-google-onetap"

const MyComponent = withScriptjs(withCredential((props) =>
  <span>
    {props.displayName}
  </span>
))

<MyComponent
  supportedAuthMethods={[
    'https://accounts.google.com',
    'googleyolo://id-and-password',
  ]}
  supportedIdTokenProviders={[
    {
      uri: 'https://accounts.google.com',
      clientId: 'YOUR_GOOGLE_CLIENT_ID',
    },
  ]}
/>
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago