Skip to content

first draft#2345

Draft
DariuszRozmus wants to merge 1 commit intomasterfrom
2318-remove-use-password-login-from-plgrid-instance
Draft

first draft#2345
DariuszRozmus wants to merge 1 commit intomasterfrom
2318-remove-use-password-login-from-plgrid-instance

Conversation

@DariuszRozmus
Copy link
Copy Markdown

Fixes #2318

@DariuszRozmus DariuszRozmus self-assigned this Mar 23, 2026
@grzanka
Copy link
Copy Markdown
Contributor

grzanka commented Mar 24, 2026

That is not correct. Demo mode is used for deployment to yaptide.github.io and yaptide.github.io/web_dev.
Normal mode is used for deployment to https://yap-dev.c3.plgrid.pl/ and https://yaptide.c3.plgrid.pl/

I would like to get rid of user and password from all four of this sites, but keep the possibility to enable it when working locally.

That can be achieved by defining new env variable with reasonable mode which would control whether user+password mode is displayed or not.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes/hides the “use password login” option on the login screen for the PLGrid (alt auth) flow, addressing Issue #2318.

Changes:

  • Read demoMode from config in LoginPanel.
  • Add showPasswordLogin flag and render the “use password login” link conditionally.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (initialized && !keycloak.authenticated) keycloak.login();
}, [initialized, keycloak]);

const showPasswordLogin = !altAuth && !demoMode;
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

showPasswordLogin is computed as !altAuth && !demoMode, but the link is rendered only inside the altAuth && !namePasswordLogin branch. When altAuth is true, this condition is always false, so the password-login fallback becomes unreachable (and NamePasswordLoginPanel can no longer be reached when altAuth is enabled). Adjust the condition to match the intended behavior (e.g., gate on altAuth and the specific environment/instance you want to disable it for, rather than !altAuth).

Suggested change
const showPasswordLogin = !altAuth && !demoMode;
const showPasswordLogin = altAuth && !demoMode;

Copilot uses AI. Check for mistakes.
@grzanka
Copy link
Copy Markdown
Contributor

grzanka commented Mar 24, 2026

@DariuszRozmus find some better title for the PR as well

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.

Remove "use password login" from plgrid instance

3 participants