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:
Scott Wilson
2025-01-28 09:53:40 -08:00
parent 6af7c5c371
commit d74b819f57
2 changed files with 11 additions and 8 deletions
@@ -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();