mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 19:23:31 +00:00
89577fe533
The applyAuthContextHeaders early-return in CheckAuth skipped the OIDC token refresh block, causing long-lived OIDC sessions to expire instead of auto-refreshing. Move the refresh trigger into extractAndStoreAuthContext so it fires at the middleware level before CheckAuth's early return. Also add a nil guard on mtPersistence in AISettingsHandler.GetAIService for non-default org paths, preventing a potential panic if background code carries a non-default org context in v5 single-tenant mode.