From 0bd891b080fc2874555ba1fffde656e8b4c6f48c Mon Sep 17 00:00:00 2001 From: Ste Vaidis Date: Wed, 8 Jan 2025 10:30:07 +0200 Subject: [PATCH] Update OAuth2-Backend-Approach.md --- OAuth2-Backend-Approach.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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