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>
This commit is contained in:
committed by
Bryan Frimin
parent
428d28fade
commit
9abea50507
@@ -75,6 +75,11 @@ export default function AuthErrorPage() {
|
||||
const [searchParams] = useSearchParams();
|
||||
const content = useAuthErrorContent(searchParams.get("error"));
|
||||
|
||||
const continueParam = searchParams.get("continue");
|
||||
const loginSearch = continueParam
|
||||
? `?${new URLSearchParams({ continue: continueParam }).toString()}`
|
||||
: "";
|
||||
|
||||
usePageTitle(content.title);
|
||||
|
||||
return (
|
||||
@@ -83,7 +88,13 @@ export default function AuthErrorPage() {
|
||||
<h1 className="text-2xl font-bold">{content.title}</h1>
|
||||
<p className="text-txt-tertiary">{content.description}</p>
|
||||
</div>
|
||||
<Button className="w-full h-10" to="/auth/login">
|
||||
<Button
|
||||
className="w-full h-10"
|
||||
to={{
|
||||
pathname: "/auth/login",
|
||||
search: loginSearch,
|
||||
}}
|
||||
>
|
||||
{t("auth.actions.signIn")}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user