From a47d80b255f1501e39bebd7ad7e80119c8ed1697 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Thu, 19 Jan 2023 11:15:12 -0500 Subject: Email verification works - Added /auth/verify to authenticated route whitelist - Updated /auth/verify to properly mark a user as verified, return a response, and fix expiration time check - Implemented /auth/verify/resend - Moved verification email sending to a helper method - Fixed VerifyEmailSchema requiring captcha_key --- src/api/middlewares/Authentication.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/api/middlewares') diff --git a/src/api/middlewares/Authentication.ts b/src/api/middlewares/Authentication.ts index ea0aa312..f4c33963 100644 --- a/src/api/middlewares/Authentication.ts +++ b/src/api/middlewares/Authentication.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { NextFunction, Request, Response } from "express"; -import { HTTPError } from "lambert-server"; import { checkToken, Config, Rights } from "@fosscord/util"; import * as Sentry from "@sentry/node"; +import { NextFunction, Request, Response } from "express"; +import { HTTPError } from "lambert-server"; export const NO_AUTHORIZATION_ROUTES = [ // Authentication routes @@ -28,6 +28,7 @@ export const NO_AUTHORIZATION_ROUTES = [ "/auth/location-metadata", "/auth/mfa/totp", "/auth/mfa/webauthn", + "/auth/verify", // Routes with a seperate auth system "/webhooks/", // Public information endpoints -- cgit 1.5.1