Commit 86fe88c
authored
fix(navbar): recognize authenticated users by using credentials include in fetch
Previously, the checkUserAuth function would bail out immediately when the
provider_token cookie was not available on the docs subdomain. This meant
users who were authenticated on cloud.layer5.io were not recognized on
docs.layer5.io, particularly in browsers like Safari with strict cookie policies.
The fix adds credentials: 'include' to the fetch request so the browser sends
cloud.layer5.io's session cookies with the API call, and removes the early
bailout when the local cookie is missing.
Fixes #11121 parent 46ad836 commit 86fe88c
2 files changed
Lines changed: 39 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
307 | 305 | | |
308 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
309 | 311 | | |
310 | | - | |
311 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
312 | 316 | | |
313 | | - | |
314 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
315 | 321 | | |
316 | 322 | | |
317 | 323 | | |
| |||
322 | 328 | | |
323 | 329 | | |
324 | 330 | | |
325 | | - | |
326 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
327 | 335 | | |
328 | 336 | | |
329 | | - | |
| 337 | + | |
330 | 338 | | |
331 | 339 | | |
332 | 340 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments