Conversation
|
That is not correct. Demo mode is used for deployment to yaptide.github.io and yaptide.github.io/web_dev. 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. |
There was a problem hiding this comment.
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
demoModefrom config inLoginPanel. - Add
showPasswordLoginflag 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; |
There was a problem hiding this comment.
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).
| const showPasswordLogin = !altAuth && !demoMode; | |
| const showPasswordLogin = altAuth && !demoMode; |
|
@DariuszRozmus find some better title for the PR as well |
Fixes #2318