1

Question:

Can someone please provide a working code example of how to use <google-signin-aware>?


I have a custom <paper-button> I'm trying to make a login button for Google.

Here is the user documentation.

Here is the Github repository.

Let Me Tink About It
  • 15,156
  • 21
  • 98
  • 207

1 Answers1

4

Probably the best example for using google-signin-aware is the google-signin element itself.

Essentially what you have to do is to include google-signin-aware with the required attributes and then call the signIn method on this element.

<google-signin-aware
    id="aware"
    client-id="..."
    scopes="..."
    ...
    is-authorized="{{isAuthorized}}"
></google-signin-aware>

<paper-button on-tap="_signIn">Sign In</paper-button>


 _signIn: function () {
   this.$.aware.signIn();
 }
Scarygami
  • 15,009
  • 2
  • 35
  • 24
  • [Here is a follow on question](http://stackoverflow.com/questions/31632661/polymer-1-0-what-could-be-causing-this-error-uncaught-typeerror-this-is-not). Just ripe for a quick answer acceptance and upvote if you have any ideas. =] – Let Me Tink About It Jul 26 '15 at 01:22