diff --git a/app/client/modules/auth/routes/login.tsx b/app/client/modules/auth/routes/login.tsx index 62a52efb..555ce544 100644 --- a/app/client/modules/auth/routes/login.tsx +++ b/app/client/modules/auth/routes/login.tsx @@ -133,7 +133,7 @@ export default function LoginPage() {
- +
{ + onError: ({ error }) => { toast.error("Failed to change password", { - description: error.error.message, + description: error.message, }); }, onRequest: () => { diff --git a/app/lib/auth.ts b/app/lib/auth.ts index 35939000..20631681 100644 --- a/app/lib/auth.ts +++ b/app/lib/auth.ts @@ -46,7 +46,15 @@ const createBetterAuth = (secret: string) => session: { modelName: "sessionsTable", }, - plugins: [username(), twoFactor()], + plugins: [ + username(), + twoFactor({ + backupCodeOptions: { + storeBackupCodes: "encrypted", + amount: 5, + }, + }), + ], advanced: { disableOriginCheck: true, },