1
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-11 15:43:32 +08:00
parent f19e482c8f
commit 0981d6ee1b
78 changed files with 1102 additions and 8510 deletions

View File

@@ -6,6 +6,7 @@ import type {
AuthAuditLogsResponse,
AuthBindingStatus,
AuthEntryResponse,
AuthLoginOptionsResponse,
AuthLiftRiskBlockResponse,
AuthLoginMethod,
AuthLogoutAllResponse,
@@ -151,6 +152,14 @@ export async function buildAuthMeResponse(
};
}
export function buildAuthLoginOptionsResponse(
context: AppContext,
): AuthLoginOptionsResponse {
return {
availableLoginMethods: resolveAvailableLoginMethods(context),
};
}
async function signUserAuthPayload(
context: AppContext,
user: UserRecord,
@@ -1077,12 +1086,14 @@ export async function startWechatLogin(
context: AppContext,
callbackUrl: string,
redirectPath: string,
requestContext: RefreshSessionRequestContext | null = null,
): Promise<AuthWechatStartResponse> {
const stateRecord = context.wechatAuthStates.create(redirectPath);
return {
authorizationUrl: context.wechatAuthService.buildAuthorizationUrl({
callbackUrl,
state: stateRecord.state,
userAgent: requestContext?.userAgent ?? null,
}),
};
}