mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Add userAlias check
This commit is contained in:
@@ -123,6 +123,7 @@ export const userServiceFactory = ({
|
||||
|
||||
if (token?.aliasId) {
|
||||
const userAlias = await userAliasDAL.findOne({ userId: user.id, id: token.aliasId });
|
||||
if (!userAlias) throw new NotFoundError({ name: `User alias with ID '${token.aliasId}' not found` });
|
||||
if (userAlias?.isEmailVerified)
|
||||
throw new BadRequestError({ name: "Failed to verify email verification code due to email already verified" });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user