This commit is contained in:
かっこかり 2024-11-09 15:06:33 +09:00 committed by GitHub
commit 7f9bec8b7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 66 additions and 10 deletions

View file

@ -137,6 +137,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',