Update OAuth2.md
This commit is contained in:
parent
b48af299eb
commit
e86e46c96e
10
OAuth2.md
10
OAuth2.md
@ -6,11 +6,11 @@ A way for the `user` to tell `google` to give an access token to `xorismesiti.gr
|
||||
|
||||
1. **User clicks** "Login with Google" on your platform `xorismesiti.gr`
|
||||
2. **Authorization Request**: Redirect to Google's authorization endpoint `accounts.google.com/o/oauth2`, requesting the user's data
|
||||
3. **User Login and Consent**: User logs in to Google and grants permissions.
|
||||
4. **Authorization Code Response**: Google redirects back to your platform `xorismesiti.gr/callback` with an authorization code.
|
||||
5. **Access Token Request**: Exchange the authorization code for an access token.
|
||||
6. **Access Protected Resources**: Use the access token to fetch the user's Google profile and email from `googleapis.com/oauth2`
|
||||
7. **Token Refresh** (Optional): If the token expires, use the refresh token to get a new access token.
|
||||
3. **User Login and Consent**: User login to Google and grants permissions.
|
||||
4. **Authorization Code Response**: Google redirects back to your platform `xorismesiti.gr/callback` with an authorization `code`.
|
||||
5. **Access Token Request**: Exchange the authorization `code` for an access `token`.
|
||||
6. **Access Protected Resources**: Use the access `token` to fetch the user's Google profile and email from `googleapis.com/oauth2`
|
||||
7. **Token Refresh** (Optional): If the `token` expires, use the `refresh token` to get a new access `token`.
|
||||
|
||||
# 1. Authorization Request (User Initiates Login)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user