Attempt to fix google signin #2
This commit is contained in:
parent
a14a430d51
commit
ce01e50ec1
@ -21,7 +21,7 @@
|
|||||||
}(document, 'script', 'facebook-jssdk'));
|
}(document, 'script', 'facebook-jssdk'));
|
||||||
fb:login-button(scope="public_profile,email", onlogin="checkLoginState();" data-max-rows="1", data-size="large", data-button-type="login_with", data-show-faces="false", data-auto-logout-link="false", data-use-continue-as="false")
|
fb:login-button(scope="public_profile,email", onlogin="checkLoginState();" data-max-rows="1", data-size="large", data-button-type="login_with", data-show-faces="false", data-auto-logout-link="false", data-use-continue-as="false")
|
||||||
if auth.google
|
if auth.google
|
||||||
script(src="https://apis.google.com/js/platform.js?onload=startApp")
|
script(src="https://apis.google.com/js/platform.js", async, defer)
|
||||||
a.login-btn.google-login.float-lg-right
|
a.login-btn.google-login.float-lg-right
|
||||||
i.fab.fa-fw.fa-google
|
i.fab.fa-fw.fa-google
|
||||||
span Log in With Google
|
span Log in With Google
|
||||||
@ -34,8 +34,11 @@
|
|||||||
client_id: '#{auth.google}',
|
client_id: '#{auth.google}',
|
||||||
cookie_policy: 'single_host_origin',
|
cookie_policy: 'single_host_origin',
|
||||||
fetch_basic_profile: true
|
fetch_basic_profile: true
|
||||||
});
|
}).then(function () {
|
||||||
attachSignin(document.querySelector('.google-login'));
|
attachSignin(document.querySelector('.google-login'));
|
||||||
|
}, function (e) {
|
||||||
|
console.error(e);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -57,6 +60,8 @@
|
|||||||
alert('Failed to log you in using Google.');
|
alert('Failed to log you in using Google.');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startApp();
|
||||||
if auth.twitter
|
if auth.twitter
|
||||||
a.login-btn.twitter-login.login-dialog-pop.float-lg-right(href="/api/external/twitter/login")
|
a.login-btn.twitter-login.login-dialog-pop.float-lg-right(href="/api/external/twitter/login")
|
||||||
i.fab.fa-fw.fa-twitter
|
i.fab.fa-fw.fa-twitter
|
||||||
|
Reference in New Issue
Block a user