Skip to content

Commit

Permalink
fix: make isEmailChangedAllowed properly check across tenants (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus authored Jul 24, 2024
1 parent 766135f commit 7b4380d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changes

- Updates `createOrUpdateThirdPartyConfig` and `getThirdPartyConfig` dashboard APIs to handle boxy SAML inputs.
- Fixes an issue where `isEmailChangeAllowed` was not checking across all tenants

### Breaking changes

Expand Down
2 changes: 1 addition & 1 deletion lib/build/recipe/accountlinking/recipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class Recipe extends recipeModule_1.default {
}
for (const tenantId of inputUser.tenantIds) {
let existingUsersWithNewEmail = await this.recipeInterfaceImpl.listUsersByAccountInfo({
tenantId: inputUser.tenantIds[0],
tenantId,
accountInfo: {
email: input.newEmail,
},
Expand Down
2 changes: 1 addition & 1 deletion lib/ts/recipe/accountlinking/recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ export default class Recipe extends RecipeModule {

for (const tenantId of inputUser.tenantIds) {
let existingUsersWithNewEmail = await this.recipeInterfaceImpl.listUsersByAccountInfo({
tenantId: inputUser.tenantIds[0],
tenantId,
accountInfo: {
email: input.newEmail,
},
Expand Down

0 comments on commit 7b4380d

Please sign in to comment.