Commit Graph

6 Commits

Author SHA1 Message Date
Cursor Agent
9abea50507 Preserve continue URL on auth error re-login
Failed OIDC, magic-link, and SAML sign-ins sent users to /auth/error
without the post-login destination, so Sign in dropped OAuth flows
and deep links. Propagate a validated continue query through auth
error redirects, recover it from OIDC state when the IdP denies or
cancels login, and forward it from AuthErrorPage to /auth/login.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
2026-07-27 14:14:02 +02:00
Bryan Frimin
15df570ce8 Remove unused SAML auth error code mapper
All SAML assertion failures now share authentication_failed, so
the dedicated mapper and its tests are no longer needed.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
2026-07-24 22:25:29 +00:00
Bryan Frimin
4e895df54f Fix TenantID construction in auth error test
TenantID is an [8]byte, so casting 1 does not compile. Use
NewTenantID like the other tests.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
2026-07-24 21:48:35 +00:00
Bryan Frimin
00ed11e30b Keep SAML auth failures generic for users
Specific SAML refusal reasons leak organization and account state.
Still redirect to the shared auth error page, but always use
authentication_failed while logging the real cause server-side.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
2026-07-24 21:45:31 +00:00
Bryan Frimin
318789ec38 Cover magic-link and SAML failures on auth error page
Browser auth callbacks still returned JSON or used one-off pages
for several refusal reasons. Route OIDC email verification,
magic-link, and SAML ACS failures through /auth/error with stable
error codes so users always see an explanation.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
2026-07-24 21:32:56 +00:00
Bryan Frimin
6c4a67d3f7 Route OIDC failures through shared auth error page
A dedicated personal-account page does not scale as more refusal
reasons appear. Redirect the OIDC callback to /auth/error with an
error code query parameter so the frontend can map codes to clear
user-facing messages.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
2026-07-24 21:19:33 +00:00