I dont care
This commit is contained in:
parent
55b4bcda3f
commit
52ec490202
@ -30,19 +30,19 @@
|
||||
var startApp = function() {
|
||||
gapi.load('auth2', function(){
|
||||
// Retrieve the singleton for the GoogleAuth library and set up the client.
|
||||
auth2 = gapi.auth2.init({
|
||||
var auth2 = gapi.auth2.init({
|
||||
client_id: '#{auth.google}',
|
||||
cookie_policy: 'single_host_origin',
|
||||
fetch_basic_profile: true
|
||||
}).then(function () {
|
||||
attachSignin(document.querySelector('.google-login'));
|
||||
attachSignin(auth2, document.querySelector('.google-login'));
|
||||
}, function (e) {
|
||||
console.error(e);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
function attachSignin(element) {
|
||||
function attachSignin(auth2, element) {
|
||||
auth2.attachClickHandler(element, {},
|
||||
function (googleUser) {
|
||||
let profile = googleUser.getBasicProfile();
|
||||
|
Reference in New Issue
Block a user