fix(server): do not force sign in password length (#6188)

hotfix
This commit is contained in:
liuyi 2024-03-19 10:53:40 +08:00 committed by forehalo
parent bba1a95f9c
commit 797e3c5b35
No known key found for this signature in database
2 changed files with 1 additions and 2 deletions

View File

@ -58,7 +58,6 @@ export class AuthController {
}
if (credential.password) {
validators.assertValidPassword(credential.password);
const user = await this.auth.signIn(
credential.email,
credential.password

View File

@ -132,7 +132,7 @@ export class AuthResolver {
@Args('email') email: string,
@Args('password') password: string
) {
validators.assertValidCredential({ email, password });
validators.assertValidEmail(email);
const user = await this.auth.signIn(email, password);
await this.auth.setCookie(ctx.req, ctx.res, user);
ctx.req.user = user;