Index
-
Intro
-
Demo
-
Installation
-
Documentation
-
Examples
Intro
React and Redux Google Auth2 component.
Demo
Live demo
Installation
Use as a node module:
``
npm install react-redux-google-auth2 --save
`
Later in your component:
`
import { GoogleAuth2, SignIn, SignOut, Profile } from "react-redux-google-auth2"
`
and
`
`
In reducers:
`
import { googleAuth2Reducer } from "react-redux-google-auth2";
`
and
`
const combinedReducers = combineReducers({
googleAuth2: googleAuth2Reducer,
});
``
Documentation
GoogleAuth2:
| Property | Type | Default |
| :------- | :----- | :-------------------------------- |
| clientId | String | |
| url | Url | https://apis.google.com/js/api.js |
| scope | String | "emails" |
SignIn:
| Property | Type | Default |
| :-------- | :----- | :-------- |
| text | String | "Sign in" |
| className | String | |
SignOut:
| Property | Type | Default |
| :-------- | :----- | :--------- |
| text | String | "Sign out" |
| className | String | |
Profile:
| Property | Type | Default |
| :-------- | :------- | :------ |
| className | String | |
Examples
note-manager