mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 19:52:29 +00:00
register callback
This commit is contained in:
@@ -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