summary refs log tree commit diff
path: root/src/api/routes
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-02-24 23:46:52 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-02-24 23:46:52 +1100
commit51fe1b8955e8c7ca4ef1b3eda6a5cea769a9e191 (patch)
tree75e5fd23da11644e937b4bb8e69f5d1310c5ca97 /src/api/routes
parentMerge pull request #984 from fosscord/dependabot/npm_and_yarn/http-cache-sema... (diff)
downloadserver-51fe1b8955e8c7ca4ef1b3eda6a5cea769a9e191.tar.xz
send required_action in gateway for when email verification is required
Diffstat (limited to 'src/api/routes')
-rw-r--r--src/api/routes/auth/register.ts11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts
index c941fdf6..0bf8efae 100644
--- a/src/api/routes/auth/register.ts
+++ b/src/api/routes/auth/register.ts
@@ -278,17 +278,6 @@ router.post(
 			await Invite.joinGuild(user.id, body.invite);
 		}
 
-		// return an error for unverified accounts if verification is required
-		if (Config.get().login.requireVerification && !user.verified) {
-			throw FieldErrors({
-				login: {
-					code: "ACCOUNT_LOGIN_VERIFICATION_EMAIL",
-					message:
-						"Email verification is required, please check your email.",
-				},
-			});
-		}
-
 		return res.json({ token: await generateToken(user.id) });
 	},
 );