mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 09:54:00 +00:00
return
This commit is contained in:
@@ -39,7 +39,6 @@ export default async function Page({ searchParams }: { searchParams: any }) {
|
||||
let authMethods: AuthenticationMethodType[] | null = null;
|
||||
if (human?.email?.isVerified) {
|
||||
const authMethodsResponse = await listAuthenticationMethodTypes(userId);
|
||||
console.log(authMethodsResponse);
|
||||
if (authMethodsResponse.authMethodTypes) {
|
||||
authMethods = authMethodsResponse.authMethodTypes;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ type Props = {
|
||||
|
||||
export function VerifyForm({ userId, code, isInvite, params }: Props) {
|
||||
const t = useTranslations("verify");
|
||||
const tError = useTranslations("error");
|
||||
|
||||
const { register, handleSubmit, formState } = useForm<Inputs>({
|
||||
mode: "onBlur",
|
||||
@@ -79,7 +78,7 @@ export function VerifyForm({ userId, code, isInvite, params }: Props) {
|
||||
setError("Could not verify user");
|
||||
return;
|
||||
} else {
|
||||
router.push("/authenticator/set?" + params);
|
||||
return router.push("/authenticator/set?" + params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ type VerifyUserByEmailCommand = {
|
||||
|
||||
export async function sendVerification(command: VerifyUserByEmailCommand) {
|
||||
const verifyResponse = command.isInvite
|
||||
? await verifyInviteCode(command.userId, command.code).catch((error) => {
|
||||
? await verifyInviteCode(command.userId, command.code).catch(() => {
|
||||
return { error: "Could not verify invite" };
|
||||
})
|
||||
: await verifyEmail(command.userId, command.code).catch((error) => {
|
||||
: await verifyEmail(command.userId, command.code).catch(() => {
|
||||
return { error: "Could not verify email" };
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user