From a43277fe2e699401c07e642024932395e2de44c6 Mon Sep 17 00:00:00 2001 From: Ste Vaidis Date: Mon, 16 Dec 2024 10:58:34 +0200 Subject: [PATCH] Update OAuth2-Front-Approach.md --- OAuth2-Front-Approach.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/OAuth2-Front-Approach.md b/OAuth2-Front-Approach.md index 79061f7..33e9be9 100644 --- a/OAuth2-Front-Approach.md +++ b/OAuth2-Front-Approach.md @@ -6,6 +6,16 @@ A way for the `user` to tell `google` to give an access token to `xorismesiti.gr ### OAuth2 Frontend/Backend Flow: +| When | Why | How | +|-------|--------------------------|--------------------------------------------------| +| 1 | Get Code | Frontend ⇢ Google ⇢ Frontend | +| 2 | Exchange Code with Token | Frontend ⇢ Backend ⇢ Google ⇢ Backend ⇢ Frontend | +| 4 | Use Token | Frontend ⇢ Google ⇢ Frontend | + +


+ +### OAuth2 Frontend/Backend Flow: + 1. Frontend **Redirect** the user to Google's OAuth authorization endpoint `accounts.google.com/o/oauth2` 2. User **Login in** to Google and grant permissions 3. Google **Redirect** the user back to `xorismesiti.gr/callback` including the authorization `code`