-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support storing multiple mobile numbers and email addresses per user #857
Support storing multiple mobile numbers and email addresses per user #857
Conversation
…ple-mobile-number-support # Conflicts: # components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/IdentityRecoveryConstants.java # components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/signup/UserSelfRegistrationManager.java
…d email per user config is disabled
…/wso2/carbon/identity/recovery/connector/UserClaimUpdateConfigImplTest.java
…rification disabled.
…ed list update scenes explicitly.
PR builder started |
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/11128314508
* This thread local variable is used to stop verification pending mobile number from being set as the primary | ||
* mobile number when only updating the verifiedMobileNumbers claim. | ||
*/ | ||
private static ThreadLocal<Boolean> isOnlyVerifiedMobileNumbersUpdated = new ThreadLocal<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can have final access modifier as we are not assigning a value to the variable but rather updating states of the thread local (Not mandatory to have)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, the ThreadLocal unsetting logic was added to the PRE_ADD_USER_CLAIM events before the value change.
...very/src/main/java/org/wso2/carbon/identity/recovery/signup/UserSelfRegistrationManager.java
Show resolved
Hide resolved
PR builder started |
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/11228740568
Proposed changes in this pull request
This feature will be disabled by default for the time being, however with the following config in
deployment.toml
, the multiple support for email addresses and mobile numbers can be enabled.verifiedEmailAddresses and verifiedMobileNumbers claims can only be updated when
Enable user email verification on update
and the above config are both enabled.Multiple email addresses support
Users will be able to store multiple email addresses in newly introduced custom claim http://wso2.org/claims/emailAddresses and multiple verified email addresses in http://wso2.org/claims/verifiedEmailAddresses claim.
Multiple mobile numbers support
Users will be able to store multiple mobile numbers in newly introduced custom claim http://wso2.org/claims/mobileNumbers and multiple verified mobile numbers in http://wso2.org/claims/verifiedMobileNumbers claim.
Changes after Reference PR
1. Handling Primary Email/Mobile Updates When Multi-attribute Support is Disabled
2. Ensuring Proper Error Handling with Disabled Verification & Enabled Multi-attribute Support
3. Automatic Addition of Primary Number to Verified Lists with Enabled Multi-attribute & Verification
mobileNumbers
andverifiedMobileNumbers
lists during updates.mobileNumbers
andverifiedMobileNumbers
lists, ensuring the data remains consistent.4. Improved Handling of New Primary Number with Enabled Multi-attribute & Verification
mobileNumbers
andverifiedMobileNumbers
lists, without throwing an error ensuring a smoother transition.5. Streamlining Verification Logic for Pre-verified Mobile Numbers
SKIP_ON_ALREADY_VERIFIED_EMAIL_ADDRESSES
logic but used theSKIP_ON_INAPPLICABLE_CLAIMS
rule.6. Add Unit test for following classes.
Related Git Issue
Referenced PRs