1.1.1 • Published 7 years ago

reactjs-google-oauth v1.1.1

Weekly downloads
3
License
ISC
Repository
github
Last release
7 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

7 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago