diff --git a/backend/src/services/auth/auth-password-service.ts b/backend/src/services/auth/auth-password-service.ts index aef8eafb9..9f004eafc 100644 --- a/backend/src/services/auth/auth-password-service.ts +++ b/backend/src/services/auth/auth-password-service.ts @@ -345,13 +345,15 @@ export const authPaswordServiceFactory = ({ if (!user.isAccepted || !user.authMethods) throw new BadRequestError({ message: `You must complete signup to set a password` }); - await userDAL.updateById( - actor.id, - { - authMethods: [...user.authMethods, AuthMethod.EMAIL] - }, - tx - ); + if (!user.authMethods.includes(AuthMethod.EMAIL)) { + await userDAL.updateById( + actor.id, + { + authMethods: [...user.authMethods, AuthMethod.EMAIL] + }, + tx + ); + } const cfg = getConfig(); diff --git a/backend/src/services/smtp/templates/passwordSetup.handlebars b/backend/src/services/smtp/templates/passwordSetup.handlebars index 1d3a5f72d..1059a7446 100644 --- a/backend/src/services/smtp/templates/passwordSetup.handlebars +++ b/backend/src/services/smtp/templates/passwordSetup.handlebars @@ -6,7 +6,8 @@
Someone requested to set up a password for your account. Make sure you are already logged in to Infisical in the current browser before clicking the link below.
+Someone requested to set up a password for your account.
+Make sure you are already logged in to Infisical in the current browser before clicking the link below.
Setup passwordIf you didn't initiate this request, please contact {{#if isCloud}}us immediately at team@infisical.com.{{else}}your administrator immediately.{{/if}}