2.0.3 • Published 3 years ago

react-redux-google-auth2 v2.0.3

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

Index

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

<GoogleAuth2 clientId="ENTER YOUR CLIENT_ID HERE" />

<Profile className="profile" />

<SignIn text="Login" className="button" />

<SignOut text="Logout" className="button" />

In reducers:

import { googleAuth2Reducer } from "react-redux-google-auth2";

and

const combinedReducers = combineReducers({
  googleAuth2: googleAuth2Reducer,
});

Documentation

GoogleAuth2:

PropertyTypeDefault
clientIdString
urlUrlhttps://apis.google.com/js/api.js
scopeString"emails"

SignIn:

PropertyTypeDefault
textString"Sign in"
classNameString

SignOut:

PropertyTypeDefault
textString"Sign out"
classNameString

Profile:

PropertyTypeDefault
classNameString

Examples

note-manager