Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvements: make logged in status disclaimer in email more prominent and only add email auth method if not already present

Scott Wilsond74b819f572e
diff --git a/backend/src/services/auth/auth-password-service.ts b/backend/src/services/auth/auth-password-service.ts
index aef8eafb98..9f004eafc4 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 1d3a5f72dc..1059a74460 100644
--- a/backend/src/services/smtp/templates/passwordSetup.handlebars
+++ b/backend/src/services/smtp/templates/passwordSetup.handlebars
@@ -6,7 +6,8 @@
</head>
<body>
<h2>Setup your password</h2>
- <p>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.</p>
+ <p>Someone requested to set up a password for your account.</p>
+ <p><strong>Make sure you are already logged in to Infisical in the current browser before clicking the link below.</strong></p>
<a href="{{callback_url}}?token={{token}}&to={{email}}">Setup password</a>
<p>If you didn't initiate this request, please contact
{{#if isCloud}}us immediately at [email protected].{{else}}your administrator immediately.{{/if}}</p>