mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-02-03 10:14:07 +08:00
fix(passkey): allow no-username passkey login with discoverable credentials
Remove the username requirement check that was blocking passkey login without entering a username. The backend already supports discoverable credentials mode. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,16 +12,10 @@ const isPasskeyLoading = ref(false);
|
||||
const isLoginLoading = ref(false);
|
||||
|
||||
async function handlePasskeyLogin() {
|
||||
if (!user.username) {
|
||||
const message = useMessage();
|
||||
const { t } = useMyI18n();
|
||||
message.warning(t('notify.please_enter', [t('login.username')]));
|
||||
return;
|
||||
}
|
||||
|
||||
isPasskeyLoading.value = true;
|
||||
try {
|
||||
await loginWithPasskey(user.username);
|
||||
// Pass username if provided, otherwise use discoverable credentials mode
|
||||
await loginWithPasskey(user.username || undefined);
|
||||
} finally {
|
||||
isPasskeyLoading.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user