mirror of
https://github.com/logto-io/logto.git
synced 2025-03-10 22:22:45 -05:00
refactor(core): rename the password input value key
rename the password input value key
This commit is contained in:
parent
6a0bee60a1
commit
2e2b58681a
3 changed files with 4 additions and 4 deletions
|
@ -52,9 +52,9 @@ export default function experienceApiRoutes<T extends AnonymousRouter>(
|
|||
ctx.interactionSession.setInteractionEvent(InteractionEvent.SignIn);
|
||||
|
||||
// TODO: Add support for other verification types
|
||||
const { password } = verification;
|
||||
const { value } = verification;
|
||||
const passwordVerification = PasswordVerification.create(libraries, queries, identifier);
|
||||
await passwordVerification.verify(password);
|
||||
await passwordVerification.verify(value);
|
||||
ctx.interactionSession.appendVerificationRecord(passwordVerification);
|
||||
|
||||
ctx.interactionSession.identifyUser(passwordVerification.id);
|
||||
|
|
|
@ -21,7 +21,7 @@ export const signInWithPassword = async ({
|
|||
identifier,
|
||||
verification: {
|
||||
type: VerificationType.Password,
|
||||
password,
|
||||
value: password,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ export const passwordSignInPayloadGuard = z.object({
|
|||
identifier: passwordIdentifierGuard,
|
||||
verification: z.object({
|
||||
type: z.literal(VerificationType.Password),
|
||||
password: z.string(),
|
||||
value: z.string(),
|
||||
}),
|
||||
});
|
||||
export type PasswordSignInPayload = z.infer<typeof passwordSignInPayloadGuard>;
|
||||
|
|
Loading…
Add table
Reference in a new issue