mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 20:27:43 +00:00
Merge pull request #2327 from Infisical/fix/resolve-name-null-null
fix: this pr addresses null null name issue with invited users
This commit is contained in:
@@ -583,7 +583,13 @@ export const authLoginServiceFactory = ({
|
|||||||
} else {
|
} else {
|
||||||
const isLinkingRequired = !user?.authMethods?.includes(authMethod);
|
const isLinkingRequired = !user?.authMethods?.includes(authMethod);
|
||||||
if (isLinkingRequired) {
|
if (isLinkingRequired) {
|
||||||
user = await userDAL.updateById(user.id, { authMethods: [...(user.authMethods || []), authMethod] });
|
// we update the names here because upon org invitation, the names are set to be NULL
|
||||||
|
// if user is signing up with SSO after invitation, their names should be set based on their SSO profile
|
||||||
|
user = await userDAL.updateById(user.id, {
|
||||||
|
authMethods: [...(user.authMethods || []), authMethod],
|
||||||
|
firstName: !user.isAccepted ? firstName : undefined,
|
||||||
|
lastName: !user.isAccepted ? lastName : undefined
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user