Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Update auth-fns.ts
Daniel Hougaard9458c8b04f8a
diff --git a/backend/src/services/auth/auth-fns.ts b/backend/src/services/auth/auth-fns.tsindex c72f6c6a7d..ec6e0a3034 100644--- a/backend/src/services/auth/auth-fns.ts+++ b/backend/src/services/auth/auth-fns.ts@@ -66,6 +66,12 @@ export const validatePasswordResetAuthorization = (token?: string) => {const decodedToken = jwt.verify(AUTH_TOKEN_VALUE, appCfg.AUTH_SECRET) as AuthModeProviderSignUpTokenPayload;+ if (decodedToken.authTokenType !== AuthTokenType.SIGNUP_TOKEN) {+ throw new UnauthorizedError({+ message: `The provided authentication token type is not supported.`+ });+ }+return decodedToken;};