How does a user log in to Oauth?

I am researching this Oauth concept and I am still very confused about this concept. One of my main questions is how to register with google account or twitter account.

For example, let's say to register on my site, you must specify a username / password / email address / group_name. If you register on my website, you can easily provide these fields. However, let the user want to register through Google. How are these fields populated?

From my understanding, as soon as you sign up with your google credentials, you are redirected to the page of your website where you fill in the required fields. I am not sure if this is correct. Can someone help me figure this out more?

+5
source share
2 answers

Basically, OAuth works like this (depending on the version, these points consist of several steps):

  • You redirect the user to the provider where he logs in.
  • The user is redirected back to you and you get an access token

Using this access token , you can request user data from the provider. Providers typically provide a call that you can use to request the user's email address, full name, and user ID (<specific provider) , but this is not part of OAuth.

, , . , , .

+6

, , , OAuth2. :

  • (, )
  • (Google, Facebook, Twitter ..).
  • ( , - )
  • (, )
  • (, )

, , . , , ( IdP) . ( , - , ).

- - . , , .. , . .

Google Auth, / cookie .

, .

0

All Articles