diff --git a/client/src/app/main/main-home/main-home-page-login-widget.js b/client/src/app/main/main-home/main-home-page-login-widget.js index 3e5fd685..47460c2b 100644 --- a/client/src/app/main/main-home/main-home-page-login-widget.js +++ b/client/src/app/main/main-home/main-home-page-login-widget.js @@ -1,12 +1,10 @@ import React from 'react'; -import ReactDOM from 'react-dom'; import {connect} from 'react-redux'; import classNames from 'classnames'; import _ from 'lodash'; import SessionActions from 'actions/session-actions'; import API from 'lib-app/api-call'; -import focus from 'lib-core/focus'; import i18n from 'lib-app/i18n'; import PasswordRecovery from 'app-components/password-recovery'; @@ -45,9 +43,27 @@ class MainHomePageLoginWidget extends React.Component { } renderLogin() { + const defaultGoogleHandler = (response) => { + console.log(response); + } + + gapi.load('auth2', () => { + gapi.auth2.init({client_id: '50174278643-gtvjdpm5rmkv75lf3jsp95iv77a2usgu.apps.googleusercontent.com'}) + gapi.signin2.render('google-oauth-id', { + scope: 'email', + width: 200, + height: 30, + longtitle: true, + theme: 'dark', + onsuccess: defaultGoogleHandler, + onfailure: defaultGoogleHandler + }) + }) + return (
+
Loading Google Login ...
diff --git a/client/src/index.html b/client/src/index.html index 10403723..986cb3df 100755 --- a/client/src/index.html +++ b/client/src/index.html @@ -16,6 +16,7 @@ +