Skip to content

Append sub-org ID to username when domain validation is disabled #214

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

Merged

Conversation

HasiniSama
Copy link
Contributor

@HasiniSama HasiniSama commented Nov 5, 2024

Purpose

&subject

Fixes: wso2/product-is#21504

This will also fix the flow for other tenants.

Goals

The current implementation of the basic authenticator skips the preprocessUsername method, which appends the sub-organization ID to the username. Without this appended ID, the userstore manager cannot locate the user in the correct organization. This causes the authentication status to be set as "FAIL", resulting in an authentication failure.

Approach

Move the preprocessUsername method call outside the if-condition.

@HasiniSama HasiniSama force-pushed the email-domain-validation branch from 7d63e6a to 5d614ed Compare November 5, 2024 06:06
@HasiniSama HasiniSama force-pushed the email-domain-validation branch from 5d614ed to 9276ba2 Compare November 12, 2024 08:22
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/11793730980

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/11793730980
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a 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/11793730980

@sadilchamishka sadilchamishka merged commit 2538f84 into wso2-extensions:master Nov 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authentication Failure for Sub-Organization Users When Email Username Validation is disabled
4 participants