fix(backend): パスワードレスログインが有効になっている場合でも誤ってパスワードを要求していたのを修正

This commit is contained in:
kakkokari-gtyih 2024-10-11 11:22:41 +09:00
parent 132c4ba6ce
commit cede212815
7 changed files with 63 additions and 10 deletions

View file

@ -136,6 +136,17 @@ export class SigninApiService {
if (password == null) {
reply.code(200);
if (profile.twoFactorEnabled) {
if (profile.usePasswordLessLogin && securityKeysAvailable) {
const authRequest = await this.webAuthnService.initiateAuthentication(user.id);
return {
finished: false,
next: 'passkey',
force: true,
authRequest,
} satisfies Misskey.entities.SigninFlowResponse;
}
return {
finished: false,
next: 'password',