Update auth-fns.ts

This commit is contained in:
Daniel Hougaard
2025-03-10 22:15:30 +04:00
parent 795d9e4413
commit 9458c8b04f

View File

@@ -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;
};