Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

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

liuyi797e3c5b357b
diff --git a/packages/backend/server/src/core/auth/controller.ts b/packages/backend/server/src/core/auth/controller.ts
index e2ffed2525..47615005c8 100644
--- a/packages/backend/server/src/core/auth/controller.ts
+++ b/packages/backend/server/src/core/auth/controller.ts
@@ -58,7 +58,6 @@ export class AuthController {
}
if (credential.password) {
- validators.assertValidPassword(credential.password);
const user = await this.auth.signIn(
credential.email,
credential.password
diff --git a/packages/backend/server/src/core/auth/resolver.ts b/packages/backend/server/src/core/auth/resolver.ts
index edd2d2168d..58969d0b7b 100644
--- a/packages/backend/server/src/core/auth/resolver.ts
+++ b/packages/backend/server/src/core/auth/resolver.ts
@@ -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;