0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(schemas): add missing log types for continue with passwordless (#2409)

This commit is contained in:
wangsijie 2022-11-11 18:07:25 +08:00 committed by GitHub
parent eef2942933
commit 6680a9c418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,6 +176,18 @@ const forgotPasswordResetLogPayloadGuard = arbitraryLogPayloadGuard.and(
})
);
const continueEmailSendPasscodeLogPayloadGuard = arbitraryLogPayloadGuard.and(
z.object({
email: z.string().optional(),
})
);
const continueSmsSendPasscodeLogPayloadGuard = arbitraryLogPayloadGuard.and(
z.object({
phone: z.string().optional(),
})
);
export enum TokenType {
AccessToken = 'AccessToken',
RefreshToken = 'RefreshToken',
@ -224,6 +236,8 @@ const logPayloadsGuard = z.object({
ForgotPasswordEmailSendPasscode: forgotPasswordEmailSendPasscodeLogPayloadGuard,
ForgotPasswordEmail: forgotPasswordEmailLogPayloadGuard,
ForgotPasswordReset: forgotPasswordResetLogPayloadGuard,
ContinueEmailSendPasscode: continueEmailSendPasscodeLogPayloadGuard,
ContinueSmsSendPasscode: continueSmsSendPasscodeLogPayloadGuard,
CodeExchangeToken: exchangeTokenLogPayloadGuard,
RefreshTokenExchangeToken: exchangeTokenLogPayloadGuard,
RevokeToken: revokeTokenLogPayloadGuard,