fix: signin の資格情報が足りないだけの場合はエラーにせず200を返すように (#14700)

* fix: signin の資格情報が足りないだけの場合はエラーにせず200を返すように

* run api extractor

* fix

* fix

* fix test

* /signin -> /signin-flow

* fix

* fix lint

* rename

* fix

* fix
This commit is contained in:
かっこかり
2024-10-05 12:03:47 +09:00
committed by GitHub
parent fa06c59eae
commit ae3c155490
13 changed files with 230 additions and 234 deletions

View File

@@ -267,7 +267,7 @@ export type SignupPendingResponse = {
i: string,
};
export type SigninRequest = {
export type SigninFlowRequest = {
username: string;
password?: string;
token?: string;
@@ -278,6 +278,19 @@ export type SigninRequest = {
'm-captcha-response'?: string | null;
};
export type SigninFlowResponse = {
finished: true;
id: User['id'];
i: string;
} | {
finished: false;
next: 'captcha' | 'password' | 'totp';
} | {
finished: false;
next: 'passkey';
authRequest: PublicKeyCredentialRequestOptionsJSON;
};
export type SigninWithPasskeyRequest = {
credential?: AuthenticationResponseJSON;
context?: string;
@@ -289,12 +302,7 @@ export type SigninWithPasskeyInitResponse = {
};
export type SigninWithPasskeyResponse = {
signinResponse: SigninResponse;
};
export type SigninResponse = {
id: User['id'],
i: string,
signinResponse: SigninFlowResponse;
};
type Values<T extends Record<PropertyKey, unknown>> = T[keyof T];