diff --git a/OAuth2-Backend-Approach.md b/OAuth2-Backend-Approach.md index c3461e7..29dbdd5 100644 --- a/OAuth2-Backend-Approach.md +++ b/OAuth2-Backend-Approach.md @@ -213,7 +213,7 @@ curl -X GET "https://www.googleapis.com/oauth2/v3/userinfo" \ -H "Accept: application/json" ``` -### 3. Google **response** to Back with profile data +### 3. Google **response** to Backend with profile data ``` { @@ -239,6 +239,7 @@ curl -X GET "https://www.googleapis.com/oauth2/v3/userinfo" \ "email": "john.doe@example.com", } ``` +


### Frontend Dashboard Code @@ -296,11 +297,13 @@ function DashboardPage() { } ``` +


+ ### Backend Dashboard -If the token is valid send the data. +If the frontend token is valid, the backend will response to the request. -If the token is not valid: +If the frontend token is **not** valid, the backend will: 1. Get new tokens using refresh token 2. Set new cookie with new access token