Update OAuth2-Front-Approach.md
This commit is contained in:
parent
f9af5b89ba
commit
7b04f99181
@ -327,14 +327,14 @@ res.cookie('access_token', accessToken, {
|
||||
|
||||
<br>
|
||||
|
||||
1. The frontend receives the tokens from the Backend response,
|
||||
2. Store them in the localStorage of the browser
|
||||
1. The frontend receives the tokens from the Backend response
|
||||
2. Store them in a secure cookie
|
||||
3. Make authenticated requests directly to Google API
|
||||
|
||||
<br>
|
||||
|
||||
<details>
|
||||
<summary><h4>HTTP GET Request from Frontend to Backend</h4></summary>
|
||||
<summary><h4>HTTP GET Request from Frontend to Google</h4></summary>
|
||||
|
||||
```bash
|
||||
GET https://www.googleapis.com/oauth2/v3/userinfo
|
||||
@ -344,7 +344,7 @@ Authorization: Bearer ACCESSTOKEN6zXZkHi2XITkDoOVACCESSTOKEN
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><h4>HTTP GET Response from Backend to Frontend</h4></summary>
|
||||
<summary><h4>HTTP GET Response from Google to Frontend</h4></summary>
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user