does a “sign in with google” approach for a web app imply the need for OpenID with google (or can OAuth be used)?

StackOverflow https://stackoverflow.com/questions/9303217

  •  25-10-2019
  •  | 
  •  

Question

does a "sign in with google" approach for a web app imply the need for OpenID with google (or can OAuth be used)?

Reading the google pages it almost seems you need to use OpenID for "sign in using google", and OAuth to get data via google api's?

CLARIFICATION: actually digging deeper looking at what the ruby "omniauth-google-oauth2" GEM is doing when it is successfully doing a "sign in with google" for me, I see it is hitting:

https://accounts.google.com/o/oauth2/auth.

And is including in the "scope" it passes

"https://www.googleapis.com/auth/userinfo.email"
"https://www.googleapis.com/auth/userinfo.profile".

So this this would imply OAuth can be used for "sign in with google" no?

Was it helpful?

Solution 2

Answer seems to be YES. Documented here:

http://code.google.com/apis/accounts/docs/OAuth2Login.html

OTHER TIPS

It really depends upon your needs, but the simple approach is to use the REST/JSON gitapi calls. There is an intermediate result you can use to glean a unique ID for the user logging on and a post-confirmation that will give you more info (e.g. e-mail address, first and last name). It is a simpler approach than OAUTH, but it may not provide everything you need to know.

See the docs here: http://code.google.com/apis/identitytoolkit/v1/reference.html

(Oh, make sure your server posts are done with UTF-8 encoding if you are posting from a C# server. Examples are given for other languages.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top