diff --git a/server/commands/accountProvisioner.test.ts b/server/commands/accountProvisioner.test.ts index a3f637da69..0d24074609 100644 --- a/server/commands/accountProvisioner.test.ts +++ b/server/commands/accountProvisioner.test.ts @@ -145,7 +145,6 @@ describe("accountProvisioner", () => { expect(user.id).toEqual(userWithoutAuth.id); expect(isNewTeam).toEqual(false); expect(isNewUser).toEqual(false); - expect(user.authentications.length).toEqual(0); }); it("should throw an error when authentication provider is disabled", async () => { diff --git a/server/commands/userProvisioner.ts b/server/commands/userProvisioner.ts index ef16c97e1f..0a280a2eec 100644 --- a/server/commands/userProvisioner.ts +++ b/server/commands/userProvisioner.ts @@ -121,10 +121,7 @@ export default async function userProvisioner( // A `user` record may exist even if there is no existing authentication record. // This is either an invite or a user that's external to the team - const existingUser = await User.scope([ - "withAuthentications", - "withTeam", - ]).findOne({ + const existingUser = await User.scope(["withTeam"]).findOne({ where: { // Email from auth providers may be capitalized email: {