Repository navigation
2427 clarify keycloak only login visibility - #2455
Open
DariuszRozmus wants to merge 3 commits into
Open
DariuszRozmus wants to merge 3 commits into
DariuszRozmus wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
PR #2427 hides the password-login link when the backend reports:
{ "local_users_enabled": false }The current implementation initializes
localUsersEnabledtotrue. As a result, on a Keycloak-only deployment the password-login link may be visible briefly before the first response from the backend is received.The purpose of this task is to fix this initial-state problem and make the affected login flow easier to understand without introducing a broader authentication refactor.
Scope
The work should be limited to:
AuthService;LoginPanel;The existing backend API and deployment configuration must remain unchanged.
Planned changes
1. Represent the capability as unknown initially
Change the frontend state from an unconditional boolean:
to a state that can represent the fact that the backend has not responded yet:
The intended behavior is:
undefined: the frontend has not received a successful capability response yet;true: local users are enabled;false: local users are disabled.After a successful response from
GET /:local_users_enabledis present;truefor compatibility with older backends.A failed request must not set the value to
true. If a previous value was already known, it should remain unchanged until a later successful response.2. Prevent password login from being offered before confirmation
On PLGrid/Keycloak deployments:
localUsersEnabledisundefined;localUsersEnabled === true;localUsersEnabled === false;The backend remains the final authority and must continue to reject disabled local login with HTTP 403.
Non-PLGrid/local deployments should preserve their current behavior.
3. Improve only the local names involved in this flow
Rename the directly affected UI state variables to make their meaning clearer:
namePasswordLoginSelected→isPasswordLoginSelected;namePasswordLogin→showPasswordLoginForm.Do not perform a broad rename of
altAuth,ResponseRootor all authentication-related terminology in this task. Those can be handled separately if needed.4. Add focused verification
Add or update tests, if the existing test setup supports them, for:
local_users_enabled: true;local_users_enabled: false;local_users_enabled;If adding component tests would require creating a new test infrastructure, perform a focused manual browser verification instead and document the scenarios checked.