Skip to content
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

Password recovery email has userstore domain prepended to the user #22343

Open
tharakawijekoon opened this issue Jan 21, 2025 · 0 comments
Open
Labels

Comments

@tharakawijekoon
Copy link

tharakawijekoon commented Jan 21, 2025

Description

After the fix done for #18637, the userstore domain gets prepended to the user when the password recovery is triggered with the realm property.

Steps to Reproduce

curl -kv --location 'https://localhost:9443/t/tenant1.com/api/identity/recovery/v0.9/recover-password' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW5AdGVuYW50MS5jb206YWRtaW4=' \
--data '{
    "user": {
        "username": "testuser1",
        "realm": "SECONDARY",
        "tenant-domain": "tenant1.com"
    },
    "properties": []
}'

Expected behavior:
Even when the request has the realm defined, the email sent to the user should not have the domain prepended.

The previous behavior can be maintained by removing the realm property from the request

curl -kv --location 'https://localhost:9443/t/tenant1.com/api/identity/recovery/v0.9/recover-password' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW5AdGVuYW50MS5jb206YWRtaW4=' \
--data '{
    "user": {
        "username": "testuser1",
        "tenant-domain": "tenant1.com"
    },
    "properties": []
}'

However this would require a change in the client side.

[1]https://is.docs.wso2.com/en/5.11.0/learn/password-recovery/#recovery-using-notifications

Version

WSO2-IS-5.11.0

Environment Details (with versions)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant