mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-16 18:55:11 +00:00
# Which Problems Are Solved When a user needed to verify their email during an OIDC login flow, the requestId was lost, preventing the flow from completing with a redirect back to the relying party. # How the Problems Are Solved In `sendVerification()`, the session cookie lookup used `"loginName" in command` to decide whether to fall back to `user.preferredLoginName`. Since the `loginName` property key always exists in the command object (even when its value is undefined), the fallback was never triggered. This caused the lookup to search for loginName === undefined, finding no session — and ultimately redirecting to a dead-end success page. - /authenticator/set redirect: Added missing requestId to the URL params when redirecting users who need to set up a primary auth method. - /verify/success page: Added a "Continue" button that re-enters the login flow with requestId preserved, handling the edge case where no session cookie exists (e.g. email link opened in a different browser).
28 lines
654 B
TypeScript
28 lines
654 B
TypeScript
"use client";
|
|
|
|
import { useTranslations } from "next-intl";
|
|
import { useRouter } from "next/navigation";
|
|
import { Button, ButtonVariants } from "./button";
|
|
|
|
type Props = {
|
|
continueUrl: string;
|
|
};
|
|
|
|
export function VerifySuccessContinue({ continueUrl }: Props) {
|
|
const router = useRouter();
|
|
const t = useTranslations("verify");
|
|
|
|
return (
|
|
<div className="mt-8 flex w-full flex-row items-center justify-end">
|
|
<Button
|
|
type="button"
|
|
variant={ButtonVariants.Primary}
|
|
onClick={() => router.push(continueUrl)}
|
|
data-testid="continue-button"
|
|
>
|
|
{t("successContinue")}
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|