mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 23:27:14 +00:00
Update auth-fns.ts
This commit is contained in:
@@ -66,6 +66,12 @@ export const validatePasswordResetAuthorization = (token?: string) => {
|
|||||||
|
|
||||||
const decodedToken = jwt.verify(AUTH_TOKEN_VALUE, appCfg.AUTH_SECRET) as AuthModeProviderSignUpTokenPayload;
|
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;
|
return decodedToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user