Skip to content

swamig/react-google-login

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#React Google Login

A Component React for Google Login

##Install dependences npm install react npm install react-Google-login --save

How to use

'use strict'

var React = require('react'),
    Google = require('react-Google-login');

// Result response Google Login
var resultGoogleLogin = function( response ) {
  console.log( response );
}

React.render(
  <Google
        appId="1088597931155576"
        class="Google-login"
        scope="public_profile, email, user_birthday"
        loginHandler={ resultGoogleLogin } />,

  document.getElementById('Google-login'))
<!DOCTYPE html>
<html>
<head>
    <title>Example React Google Login</title>
</head>
<body>
    <div id="Google-login"></div>
</body>
</html>

##Parameters

params value default value
appId string ""
class string Google-login
scope string public_profile, email, user_birthday
loginHandler function resultGoogleLogin
autoLoad boolean false
xfbml boolean false
callToAction string Login with Google

About

A Component React for Facebook Login

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.5%
  • CSS 14.4%
  • HTML 11.1%