1.1.1 • Published 6 years ago

reactjs-google-oauth v1.1.1

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

reactjs-google-oauth

NPM Packages that allow google oauth with or without a button.

Getting Started

Install the module with: npm install reactjs-google-oauth

API

The library enables google oauth in two different ways.

GoogleOAuth

onSignIn(accessToken, profile) {
  // Code goes here
}

const CLIENT_ID = "YOUR_CLIENT_ID";
const SCOPE_LIST = ['https://www.googleapis.com/auth/drive','profile'];
<GoogleOAuth
  clientId={CLIENT_ID}
  scope={SCOPE_LIST}
  onSignIn={this.onSignIn.bind(this)}
 />

GoogleSignIn

onSignIn(accessToken, profile) {
  // Code goes here
}

const CLIENT_ID = "YOUR_CLIENT_ID";
const SCOPE_LIST = 'https://www.googleapis.com/auth/drive';
<GoogleSignIn
  clientId={CLIENT_ID}
  scope={SCOPE_LIST}
  onSignIn={this.onSignIn.bind(this)}
 />

GoogleSignOut

onSignOut() {
  // Code goes here
}

const CLIENT_ID = "YOUR_CLIENT_ID";
<GoogleSignOut
  clientId={CLIENT_ID}
  onSignOut={this.onSignOut.bind(this)}
 />

License

Copyright (c) 2018 Shahab Khalid Licensed under the ISC license.

1.1.1

6 years ago

1.1.0

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago