Commit 7fef1e0
committed
fix(authflow): evaluate max_age from per-session auth time, not global LastLogin
The max_age check in trySessionLogin compared now against
ui.LastLogin, a single global per-identity row rewritten to now() by
EVERY interactive login from ANY browser, device, or session. A fresh
login on a second device therefore satisfied an RP's max_age
re-authentication demand for a stale session on the first device.
The per-session, per-client authentication timestamp already exists and
is populated (storage.ClientAuthState.AuthenticatedAt, written on
direct login and carried across for SSO). Use it, falling back to
ui.LastLogin only when the session has no client state.1 parent ab64ed7 commit 7fef1e0
2 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | | - | |
| 665 | + | |
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| |||
0 commit comments