Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
<Dialog.Header>
<Dialog.Title>Add Passkey</Dialog.Title>
<Dialog.Description>
Register a passkey for passwordless sign-in. Your browser will prompt you to authenticate.
Use a passkey for passwordless sign-in or as a second factor after your password. Your
browser will prompt you to authenticate.
</Dialog.Description>
</Dialog.Header>

Expand Down
9 changes: 4 additions & 5 deletions apps/dashboard/src/routes/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@

if (loginData?.twoFactorRedirect) {
const methods = loginData.twoFactorMethods;
const missingMethodsMeansTotp = !methods || methods.includes('totp');

if (missingMethodsMeansTotp) {
goto(twoFactorHref('totp'));
if (methods?.includes('passkey')) {
goto(twoFactorHref('passkey'));
return;
}

if (methods.includes('passkey')) {
goto(twoFactorHref('passkey'));
if (!methods || methods.includes('totp')) {
goto(twoFactorHref('totp'));
return;
}
}
Expand Down