Update OAuth2.md

This commit is contained in:
Ste Vaidis 2024-12-15 15:00:19 +02:00
parent c7200fabb5
commit 128d95b6c6

View File

@ -100,7 +100,7 @@ const loginWithGoogle = () => {
# 2. [Frontend] Receive Authorization Code
Now that the frontend have the Authorization Code `https://xorismesiti.gr/api/auth/callback?code=AAAABCX4XfWgyVyziyLg0QHHHHH` it can send it to the backend with POST to `xorismesiti.gr/api/auth/exchange-token`, in order the backend to exchange the `code` for an `access_token` and optionally an `refresh_token`
Now that the frontend have the Authorization `code` on th callback url https://xorismesiti.gr/api/auth/callback`?code=AAAABCX4XfWgyVyziyLg0QHHHHH` it can send it to the backend with POST to `xorismesiti.gr/api/auth/exchange-token`, in order the backend to exchange the `code` for an `access_token` and optionally an `refresh_token`
<details>
<summary><h3>Frontend HTTP POST Request to Backend</h3></summary>