mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 04:27:38 +00:00
improvements: make logged in status disclaimer in email more prominent and only add email auth method if not already present
This commit is contained in:
@@ -345,13 +345,15 @@ export const authPaswordServiceFactory = ({
|
|||||||
if (!user.isAccepted || !user.authMethods)
|
if (!user.isAccepted || !user.authMethods)
|
||||||
throw new BadRequestError({ message: `You must complete signup to set a password` });
|
throw new BadRequestError({ message: `You must complete signup to set a password` });
|
||||||
|
|
||||||
await userDAL.updateById(
|
if (!user.authMethods.includes(AuthMethod.EMAIL)) {
|
||||||
actor.id,
|
await userDAL.updateById(
|
||||||
{
|
actor.id,
|
||||||
authMethods: [...user.authMethods, AuthMethod.EMAIL]
|
{
|
||||||
},
|
authMethods: [...user.authMethods, AuthMethod.EMAIL]
|
||||||
tx
|
},
|
||||||
);
|
tx
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const cfg = getConfig();
|
const cfg = getConfig();
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h2>Setup your password</h2>
|
<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>
|
<a href="{{callback_url}}?token={{token}}&to={{email}}">Setup password</a>
|
||||||
<p>If you didn't initiate this request, please contact
|
<p>If you didn't initiate this request, please contact
|
||||||
{{#if isCloud}}us immediately at [email protected].{{else}}your administrator immediately.{{/if}}</p>
|
{{#if isCloud}}us immediately at [email protected].{{else}}your administrator immediately.{{/if}}</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user