Commit 9117453
fix(youtube): validate OAuth state parameter during authentication
Add a check that the `state` returned in the OAuth callback matches the value stored before the sign-in flow began. This prevents CSRF attacks by ensuring the response corresponds to the original request. If the state does not match, an error is thrown with a clear message prompting the user to re-authenticate.
[auto-enhanced]1 parent 523878e commit 9117453
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
| |||
0 commit comments