Update disabled sign up routes

This commit is contained in:
Salman
2024-02-14 14:18:44 +05:30
parent 0ff3ddb0c8
commit ee69bccb6e
2 changed files with 28 additions and 2 deletions
@@ -270,8 +270,7 @@ export const authLoginServiceFactory = ({ userDAL, tokenService, smtpService }:
if (!user) {
// Create a new user based on oAuth
if (!serverCfg?.allowSignUp)
throw new BadRequestError({ message: "User signup disabled", name: "Oauth 2 login" });
if (!serverCfg?.allowSignUp) throw new BadRequestError({ message: "Sign Up disabled", name: "Oauth 2 login" });
if (serverCfg?.allowedSignUpDomain) {
const domain = email.split("@")[1];