Commit d6fe4d5
fix: restore session before auth middleware in SPA mode
In SPA mode (useSsrCookies: false), explicitly call getSession() during
plugin setup so the session state is populated before auth middleware runs.
This prevents authenticated users from being incorrectly redirected on
direct navigation or page reload.
Fixes #496
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4379ca3 commit d6fe4d5
2 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
| |||
0 commit comments