chore: pr feedbacks

This commit is contained in:
Nicolas Meienberger 2026-01-09 20:49:46 +01:00
parent 6a696d090e
commit 522505c1e7
3 changed files with 12 additions and 4 deletions

View file

@ -133,7 +133,7 @@ export default function LoginPage() {
<AuthLayout title="Two-Factor Authentication" description="Enter the 6-digit code from your authenticator app">
<div className="space-y-6">
<div className="space-y-4 flex flex-col items-center">
<Label htmlFor="totp-code text-center">Authentication code</Label>
<Label htmlFor="totp-code">Authentication code</Label>
<div>
<InputOTP
maxLength={6}

View file

@ -113,9 +113,9 @@ export default function Settings({ loaderData }: Route.ComponentProps) {
void handleLogout();
}, 1500);
},
onError: (error) => {
onError: ({ error }) => {
toast.error("Failed to change password", {
description: error.error.message,
description: error.message,
});
},
onRequest: () => {

View file

@ -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,
},