show auth setup for 0 auth methods

This commit is contained in:
Max Peintner
2024-10-25 10:50:42 +02:00
parent fc3d8f0c15
commit 4bd0f96a3b
2 changed files with 4 additions and 3 deletions

View File

@@ -39,6 +39,7 @@ 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;
}
@@ -92,7 +93,7 @@ export default async function Page({ searchParams }: { searchParams: any }) {
<div className="mt-8 flex w-full flex-row items-center">
<BackButton />
<span className="flex-grow"></span>
{authMethods?.length !== 0 && (
{authMethods?.length === 0 && (
<Link href={`/authenticator/set?+${params}`}>
<Button
type="submit"