fix
This commit is contained in:
parent
73e063bcb7
commit
35dd85762d
|
@ -139,12 +139,12 @@ export class SigninFlowApiService {
|
|||
return {
|
||||
finished: false,
|
||||
next: 'password',
|
||||
} satisfies Misskey.entities.SigninResponse;
|
||||
} satisfies Misskey.entities.SigninFlowResponse;
|
||||
} else {
|
||||
return {
|
||||
finished: false,
|
||||
next: 'captcha',
|
||||
} satisfies Misskey.entities.SigninResponse;
|
||||
} satisfies Misskey.entities.SigninFlowResponse;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ export class SigninFlowApiService {
|
|||
finished: false,
|
||||
next: 'passkey',
|
||||
authRequest,
|
||||
} satisfies Misskey.entities.SigninResponse;
|
||||
} satisfies Misskey.entities.SigninFlowResponse;
|
||||
} else {
|
||||
if (!same || !profile.twoFactorEnabled) {
|
||||
return await fail(403, {
|
||||
|
@ -262,7 +262,7 @@ export class SigninFlowApiService {
|
|||
return {
|
||||
finished: false,
|
||||
next: 'totp',
|
||||
} satisfies Misskey.entities.SigninResponse;
|
||||
} satisfies Misskey.entities.SigninFlowResponse;
|
||||
}
|
||||
}
|
||||
// never get here
|
||||
|
|
|
@ -61,7 +61,7 @@ export class SigninService {
|
|||
finished: true,
|
||||
id: user.id,
|
||||
i: user.token!,
|
||||
} satisfies Misskey.entities.SigninResponse;
|
||||
} satisfies Misskey.entities.SigninFlowResponse;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ import type { AuthenticationPublicKeyCredential } from '@github/webauthn-json/br
|
|||
import type { OpenOnRemoteOptions } from '@/scripts/please-login.js';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'login', v: Misskey.entities.SigninResponse): void;
|
||||
(ev: 'login', v: Misskey.entities.SigninFlowResponse): void;
|
||||
}>();
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
|
@ -212,7 +212,7 @@ async function onTotpSubmitted(token: string) {
|
|||
}
|
||||
}
|
||||
|
||||
async function tryLogin(req: Partial<Misskey.entities.SigninRequest>): Promise<Misskey.entities.SigninResponse> {
|
||||
async function tryLogin(req: Partial<Misskey.entities.SigninRequest>): Promise<Misskey.entities.SigninFlowResponse> {
|
||||
const _req = {
|
||||
username: req.username ?? userInfo.value?.username,
|
||||
...req,
|
||||
|
@ -276,7 +276,7 @@ async function tryLogin(req: Partial<Misskey.entities.SigninRequest>): Promise<M
|
|||
});
|
||||
}
|
||||
|
||||
async function onLoginSucceeded(res: Misskey.entities.SigninResponse & { finished: true; }) {
|
||||
async function onLoginSucceeded(res: Misskey.entities.SigninFlowResponse & { finished: true; }) {
|
||||
if (props.autoSet) {
|
||||
await login(res.i);
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ const props = withDefaults(defineProps<{
|
|||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'signup', user: Misskey.entities.SigninResponse): void;
|
||||
(ev: 'signup', user: Misskey.entities.SigninFlowResponse): void;
|
||||
(ev: 'signupEmailPending'): void;
|
||||
}>();
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ const props = withDefaults(defineProps<{
|
|||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'done', res: Misskey.entities.SigninResponse): void;
|
||||
(ev: 'done', res: Misskey.entities.SigninFlowResponse): void;
|
||||
(ev: 'closed'): void;
|
||||
}>();
|
||||
|
||||
|
@ -55,7 +55,7 @@ const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
|||
|
||||
const isAcceptedServerRule = ref(false);
|
||||
|
||||
function onSignup(res: Misskey.entities.SigninResponse) {
|
||||
function onSignup(res: Misskey.entities.SigninFlowResponse) {
|
||||
emit('done', res);
|
||||
dialog.value?.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue