Revert hard coded setting
This commit is contained in:
@@ -39,7 +39,7 @@ const authConfig = AuthConfigSchema.parse({
|
|||||||
// in your production project
|
// in your production project
|
||||||
providers: {
|
providers: {
|
||||||
password: process.env.NEXT_PUBLIC_AUTH_PASSWORD === 'true',
|
password: process.env.NEXT_PUBLIC_AUTH_PASSWORD === 'true',
|
||||||
magicLink: true,
|
magicLink: process.env.NEXT_PUBLIC_AUTH_MAGIC_LINK === 'true',
|
||||||
oAuth: ['google'],
|
oAuth: ['google'],
|
||||||
},
|
},
|
||||||
} satisfies z.infer<typeof AuthConfigSchema>);
|
} satisfies z.infer<typeof AuthConfigSchema>);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import Image from 'next/image';
|
|||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { ExclamationTriangleIcon } from '@radix-ui/react-icons';
|
import { ExclamationTriangleIcon } from '@radix-ui/react-icons';
|
||||||
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
||||||
|
import { ArrowLeftIcon } from 'lucide-react';
|
||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
@@ -43,7 +44,6 @@ import {
|
|||||||
import { Trans } from '@kit/ui/trans';
|
import { Trans } from '@kit/ui/trans';
|
||||||
|
|
||||||
import { refreshAuthSession } from '../../../server/personal-accounts-server-actions';
|
import { refreshAuthSession } from '../../../server/personal-accounts-server-actions';
|
||||||
import {ArrowLeftIcon} from "lucide-react";
|
|
||||||
|
|
||||||
export function MultiFactorAuthSetupDialog(props: { userId: string }) {
|
export function MultiFactorAuthSetupDialog(props: { userId: string }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -282,7 +282,10 @@ function FactorQrCode({
|
|||||||
</AlertTitle>
|
</AlertTitle>
|
||||||
|
|
||||||
<AlertDescription>
|
<AlertDescription>
|
||||||
<Trans i18nKey={`auth:errors.${error}`} defaults={t('account:qrCodeErrorDescription')} />
|
<Trans
|
||||||
|
i18nKey={`auth:errors.${error}`}
|
||||||
|
defaults={t('account:qrCodeErrorDescription')}
|
||||||
|
/>
|
||||||
</AlertDescription>
|
</AlertDescription>
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
@@ -419,13 +422,13 @@ function useEnrollFactor(userId: string) {
|
|||||||
return {
|
return {
|
||||||
success: false as const,
|
success: false as const,
|
||||||
data: response.error.code,
|
data: response.error.code,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
success: true as const,
|
success: true as const,
|
||||||
data: response.data,
|
data: response.data,
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
return useMutation({
|
return useMutation({
|
||||||
|
|||||||
Reference in New Issue
Block a user