fix: Remove unnecessary loading of authentication rows in userProvisioner (#11413)

* fix: Remove unneccessary loading of authentication rows in userProvisioner

* test
This commit is contained in:
Tom Moor
2026-02-11 18:45:47 -05:00
committed by GitHub
parent a06174b627
commit 1488341f66
2 changed files with 1 additions and 5 deletions
@@ -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 () => {
+1 -4
View File
@@ -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: {