diff --git a/src/identity/identity.entity.ts b/src/identity/identity.entity.ts index 512070d3b..73d0964ee 100644 --- a/src/identity/identity.entity.ts +++ b/src/identity/identity.entity.ts @@ -100,7 +100,7 @@ export class Identity { public static create( user: User, providerType: ProviderType, - syncSource = false, + syncSource: boolean, ): Omit { const newIdentity = new Identity(); newIdentity.user = user; diff --git a/src/identity/identity.service.spec.ts b/src/identity/identity.service.spec.ts index 654a0bea3..c7c44ac41 100644 --- a/src/identity/identity.service.spec.ts +++ b/src/identity/identity.service.spec.ts @@ -95,7 +95,11 @@ describe('IdentityService', () => { describe('loginWithLocalIdentity', () => { it('works', async () => { - const identity = Identity.create(user, ProviderType.LOCAL) as Identity; + const identity = Identity.create( + user, + ProviderType.LOCAL, + false, + ) as Identity; identity.passwordHash = await hashPassword(password); user.identities = Promise.resolve([identity]); await expect( diff --git a/src/identity/identity.service.ts b/src/identity/identity.service.ts index 3dc1eb45b..22e573b27 100644 --- a/src/identity/identity.service.ts +++ b/src/identity/identity.service.ts @@ -36,7 +36,7 @@ export class IdentityService { * @return {Identity} the new local identity */ async createLocalIdentity(user: User, password: string): Promise { - const identity = Identity.create(user, ProviderType.LOCAL); + const identity = Identity.create(user, ProviderType.LOCAL, false); identity.passwordHash = await hashPassword(password); return await this.identityRepository.save(identity); }