Update OAuth2-Backend-Approach.md

This commit is contained in:
Ste Vaidis 2025-01-07 15:04:21 +02:00
parent 8b780a97eb
commit 6f01713c56

View File

@ -151,7 +151,7 @@ curl -X GET https://xorismesiti.gr/api/auth/profile \
-H "Accept: application/json"
```
### 2. Backend **GET** profile data from Google `https://www.googleapis.com/oauth2/v3/userinfo` using the `access_token` from Front `cookie`
### 2. Backend **GET** profile data from Google
```bash
curl -X GET "https://www.googleapis.com/oauth2/v3/userinfo" \
@ -186,6 +186,7 @@ curl -X GET "https://www.googleapis.com/oauth2/v3/userinfo" \
}
```
### Frontend Code
```js
import React, { useState, useEffect } from 'react';