mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-23 20:25:56 +00:00
67fa4c89c7
The legacy v5 callback path /api/oidc/callback carries no provider ID, so extractOIDCProviderID hard-maps it to the legacy-oidc sentinel. Providers created in the v6 UI get a UUID ID, and when their IdP is still registered with the legacy redirect URI the callback missed the provider lookup and returned provider_not_found with no log, breaking SSO login (authentik and similar). Peek the pending authorization state across providers to recover the provider that actually initiated the flow, re-validate it, and proceed. State stays single-use (peek never consumes), unknown/disabled/expired/ replayed all still fail closed, and the 4-part provider_mismatch guard is unchanged. The fail-closed path now logs instead of failing silently. Refs #1533, #1535