google-signin
google-signin copied to clipboard
[Request] Polymer 2.0 support
Most google web componets have a 2.0-preview branch. Is there a chance this will happen soon for the google-signin? Currently, after updating to Polymer 2.0 rc2, I get the following error on clicking the signin button:
Uncaught Error: AuthEngine not initialized. gapi has not loaded. at Object.assertAuthInitialized (google-signin-aware.html:418) at Object.signIn (google-signin-aware.html:427) at HTMLElement.signIn (google-signin-aware.html:731) at HTMLElement.signIn (google-signin.html:558) at HTMLDivElement.handler (template-stamp.html:428)
Same here I'm dead in the water...
I've added <script src="https://apis.google.com/js/platform.js"></script>
to my index.html, but now the message is about 'auth2' not being loaded:
Uncaught Error: AuthEngine not initialized. auth2 not loaded. at Object.assertAuthInitialized (google-signin-aware.html:421) at Object.signIn (google-signin-aware.html:427) at HTMLElement.signIn (google-signin-aware.html:731) at HTMLElement.signIn (google-signin.html:558) at HTMLDivElement.handler (template-stamp.html:92) assertAuthInitialized @ google-signin-aware.html:421 signIn @ google-signin-aware.html:427 signIn @ google-signin-aware.html:731 signIn @ google-signin.html:558 handler @ template-stamp.html:92
I need to somehow have this working by Friday Apr 21. Eeeek!
@TemplarRei @AndrewBarfield add this to index.html:
<script src="https://apis.google.com/js/api.js"></script>
<script>
function start() {
// Initialize the JavaScript client library.
gapi.client.init({
'apiKey': '',
// clientId and scope are optional if auth is not required.
'clientId': '',
'scope': ''})
};
</script>
and in your module:
connectedCallback() {
super.connectedCallback();
// Load the JavaScript client library.
gapi.load('client', start);
Thanks, @krisu7, we just restarted development on the migration and this should be quite helpful 👍
@TemplarRei You're welcome, I just had the same problem and this was only solution that worked for me.