Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

fix: lowercase email on local registration

Santosh Bhandaridcb1b0188a8e
diff --git a/apps/backend/src/services/auth/auth.service.ts b/apps/backend/src/services/auth/auth.service.ts
index 32b43f3b7..187c08ed5 100644
--- a/apps/backend/src/services/auth/auth.service.ts
+++ b/apps/backend/src/services/auth/auth.service.ts
@@ -43,6 +43,9 @@ export class AuthService {
if (process.env.DISALLOW_PLUS && body.email.includes('+')) {
throw new Error('Email with plus sign is not allowed');
}
+ if (body instanceof CreateOrgUserDto) {
+ body.email = body.email.toLowerCase();
+ }
const user = await this._userService.getUserByEmail(body.email);
if (body instanceof CreateOrgUserDto) {
if (user) {