mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-13 12:12:57 +00:00
register callback
This commit is contained in:
@@ -4,8 +4,15 @@ import VerifyEmailForm from "#/ui/VerifyEmailForm";
|
||||
import { ExclamationTriangleIcon } from "@heroicons/react/24/outline";
|
||||
|
||||
export default async function Page({ searchParams }: { searchParams: any }) {
|
||||
const { userID, code, submit, organization, loginname, passwordset } =
|
||||
searchParams;
|
||||
const {
|
||||
userID,
|
||||
code,
|
||||
submit,
|
||||
organization,
|
||||
authRequestId,
|
||||
loginname,
|
||||
passwordset,
|
||||
} = searchParams;
|
||||
|
||||
const branding = await getBrandingSettings(server, organization);
|
||||
|
||||
@@ -23,6 +30,7 @@ export default async function Page({ searchParams }: { searchParams: any }) {
|
||||
code={code}
|
||||
submit={submit === "true"}
|
||||
organization={organization}
|
||||
authRequestId={authRequestId}
|
||||
/>
|
||||
) : (
|
||||
<div className="w-full flex flex-row items-center justify-center border border-yellow-600/40 dark:border-yellow-500/20 bg-yellow-200/30 text-yellow-600 dark:bg-yellow-700/20 dark:text-yellow-200 rounded-md py-2 scroll-px-40">
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
} from "#/utils/validators";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { Spinner } from "./Spinner";
|
||||
import { AuthRequest } from "@zitadel/server";
|
||||
|
||||
type Inputs =
|
||||
| {
|
||||
@@ -33,12 +34,14 @@ type Props = {
|
||||
legal: LegalAndSupportSettings;
|
||||
passwordComplexitySettings: PasswordComplexitySettings;
|
||||
organization?: string;
|
||||
authRequestId?: string;
|
||||
};
|
||||
|
||||
export default function RegisterForm({
|
||||
legal,
|
||||
passwordComplexitySettings,
|
||||
organization,
|
||||
authRequestId,
|
||||
}: Props) {
|
||||
const { register, handleSubmit, watch, formState } = useForm<Inputs>({
|
||||
mode: "onBlur",
|
||||
@@ -81,6 +84,10 @@ export default function RegisterForm({
|
||||
params.organization = organization;
|
||||
}
|
||||
|
||||
if (authRequestId) {
|
||||
params.authRequestId = authRequestId;
|
||||
}
|
||||
|
||||
return router.push(`/verify?` + new URLSearchParams(params));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ type Props = {
|
||||
code: string;
|
||||
submit: boolean;
|
||||
organization?: string;
|
||||
authRequestId?: string;
|
||||
};
|
||||
|
||||
export default function VerifyEmailForm({
|
||||
@@ -24,6 +25,7 @@ export default function VerifyEmailForm({
|
||||
code,
|
||||
submit,
|
||||
organization,
|
||||
authRequestId,
|
||||
}: Props) {
|
||||
const { register, handleSubmit, formState } = useForm<Inputs>({
|
||||
mode: "onBlur",
|
||||
|
||||
Reference in New Issue
Block a user