Skip to content

Commit

Permalink
fix(core): fix sso query method
Browse files Browse the repository at this point in the history
fix sso query method
  • Loading branch information
simeng-li committed Jul 15, 2024
1 parent 6d9663c commit 8129a87
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class ProfileValidator {

public async guardProfileUniquenessAcrossUsers(profile: InteractionProfile) {
const { hasUser, hasUserWithEmail, hasUserWithPhone, hasUserWithIdentity } = this.queries.users;
const { findUserSsoIdentityBySsoIdentityId } = this.queries.userSsoIdentities;
const { userSsoIdentities } = this.queries;

const { username, primaryEmail, primaryPhone, socialIdentity, enterpriseSsoIdentity } = profile;

Expand Down Expand Up @@ -66,7 +66,10 @@ export class ProfileValidator {

if (enterpriseSsoIdentity) {
const { issuer, identityId } = enterpriseSsoIdentity;
const userSsoIdentity = await findUserSsoIdentityBySsoIdentityId(issuer, identityId);
const userSsoIdentity = await userSsoIdentities.findUserSsoIdentityBySsoIdentityId(
issuer,
identityId
);

assertThat(
!userSsoIdentity,
Expand Down

0 comments on commit 8129a87

Please sign in to comment.