Open ktiedt opened 8 years ago
google-signin docs are correct. google-signin-aware docs did not get updated when code was rewritten. Pull requests welcome :)
The demo also seems to be in line with the google-signin-aware docs, if I understood what actually was expected, I would be happy to update things, but at this level of confusion, w/zero knowledge of the elements, updating documentation would probably be the least helpful thing I could do right now.
Hi @ktiedt I'll take a stab at updating the documentation. Sorry that it isn't very clear.
The idea is that there is at least one signin button on the page using the google-signin
element. Other components can bind to the signin events and add their own additional scopes through the google-signin-aware
element. From there the signin button reacts to the scopes to request the correct permissions and the signin aware makes other elements aware of changes to the signin state and scopes.
google-signin
is only required for UI. If developer does not want to use our UI, they can use signin-aware
to interact with oauth API.
That is true, developers can also manually trigger the signin. I'll be sure to mention that.
Ahh, so signin-aware is actually the brains, the -aware makes it sound more like a secondary element. Sorting that out in my head makes things a lot more clear
Yeah, if you look at the google-signin
component it actually just calls the signin on the aware element:
https://github.com/GoogleWebComponents/google-signin/blob/master/google-signin.html#L536
google-signin
got rewritten. In the initial version, google-signin was the brains, and aware was something else. Hence the confusion. Today, google-signin is just a UI on top of signin-aware. We kept the API backward compatible, so it gets a little confusing.
In google-signin element you state:
And in google-signin-aware you state:
The former seems to imply a signin element is not needed, the latter implies it is required... Which begs the question, is the only purpose of signin-aware to notify you of states of specific scopes?