Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Polymer 2.0 support #158

Open
borisbsv opened this issue Mar 10, 2017 · 4 comments
Open

[Request] Polymer 2.0 support #158

borisbsv opened this issue Mar 10, 2017 · 4 comments

Comments

@borisbsv
Copy link

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)

@AndrewBarfield
Copy link

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!

@krisu7
Copy link

krisu7 commented Aug 4, 2017

@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);

@borisbsv
Copy link
Author

borisbsv commented Aug 4, 2017

Thanks, @krisu7, we just restarted development on the migration and this should be quite helpful 👍

@krisu7
Copy link

krisu7 commented Aug 4, 2017

@TemplarRei You're welcome, I just had the same problem and this was only solution that worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants