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

documentation is inconsistent about which element to use or not. #143

Open
ktiedt opened this issue Apr 6, 2016 · 8 comments
Open

documentation is inconsistent about which element to use or not. #143

ktiedt opened this issue Apr 6, 2016 · 8 comments
Assignees

Comments

@ktiedt
Copy link
Contributor

ktiedt commented Apr 6, 2016

In google-signin element you state:

If you do not need to show the button, use companion element to declare scopes, check authentication state.

And in google-signin-aware you state:

google-signin-aware is used to enable authentication in custom elements by interacting with a google-signin element that needs to be present somewhere on the page.

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?

@atotic
Copy link
Contributor

atotic commented Apr 11, 2016

google-signin docs are correct. google-signin-aware docs did not get updated when code was rewritten. Pull requests welcome :)

@ktiedt
Copy link
Contributor Author

ktiedt commented Apr 11, 2016

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.

@Zoramite
Copy link
Contributor

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.

@Zoramite Zoramite self-assigned this Apr 11, 2016
@atotic
Copy link
Contributor

atotic commented Apr 11, 2016

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.

@Zoramite
Copy link
Contributor

That is true, developers can also manually trigger the signin. I'll be sure to mention that.

@ktiedt
Copy link
Contributor Author

ktiedt commented Apr 11, 2016

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

@Zoramite
Copy link
Contributor

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

@atotic
Copy link
Contributor

atotic commented Apr 11, 2016

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.

Zoramite added a commit that referenced this issue May 23, 2016
…in` works.

Also provides guidance on how to use the `google-signin-aware` with custom signin UIs.

Closes #143
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