chore: pr feedbacks
This commit is contained in:
parent
6a696d090e
commit
522505c1e7
3 changed files with 12 additions and 4 deletions
|
|
@ -133,7 +133,7 @@ export default function LoginPage() {
|
||||||
<AuthLayout title="Two-Factor Authentication" description="Enter the 6-digit code from your authenticator app">
|
<AuthLayout title="Two-Factor Authentication" description="Enter the 6-digit code from your authenticator app">
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<div className="space-y-4 flex flex-col items-center">
|
<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>
|
<div>
|
||||||
<InputOTP
|
<InputOTP
|
||||||
maxLength={6}
|
maxLength={6}
|
||||||
|
|
|
||||||
|
|
@ -113,9 +113,9 @@ export default function Settings({ loaderData }: Route.ComponentProps) {
|
||||||
void handleLogout();
|
void handleLogout();
|
||||||
}, 1500);
|
}, 1500);
|
||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: ({ error }) => {
|
||||||
toast.error("Failed to change password", {
|
toast.error("Failed to change password", {
|
||||||
description: error.error.message,
|
description: error.message,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onRequest: () => {
|
onRequest: () => {
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,15 @@ const createBetterAuth = (secret: string) =>
|
||||||
session: {
|
session: {
|
||||||
modelName: "sessionsTable",
|
modelName: "sessionsTable",
|
||||||
},
|
},
|
||||||
plugins: [username(), twoFactor()],
|
plugins: [
|
||||||
|
username(),
|
||||||
|
twoFactor({
|
||||||
|
backupCodeOptions: {
|
||||||
|
storeBackupCodes: "encrypted",
|
||||||
|
amount: 5,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
advanced: {
|
advanced: {
|
||||||
disableOriginCheck: true,
|
disableOriginCheck: true,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue