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

[gateway] improve "switch account" behaviour #8236

Closed
leleueri opened this issue Jul 29, 2022 · 1 comment
Closed

[gateway] improve "switch account" behaviour #8236

leleueri opened this issue Jul 29, 2022 · 1 comment

Comments

@leleueri
Copy link
Contributor

💥 Describe the bug

When ID first login is enable and when the idfirst login page is accessed using the login_hint parameter, if an automatique redirection is done in a custom template using this JS:

<script th:if= "${param.login_hint != null && param.login_hint != ''}">
    $(document).ready(function(){
        $('#form').submit();
    });
</script>

Then the switch account link doesn't work in the login page because it includes the login_hint parameter.

🌄 To Reproduce

Steps to reproduce the behaviour:

  1. create a custom identifier first login page with the JS snippet above to validate automatically the form if login_hint is present
  2. call the authorization endpoint with a login_hint parameter
  3. the login page is displayed
  4. click on "switch account"
  5. the identifier first login page is displayed but as the login_hint parmeter is present, the form is submitted automatically

🌈 Expected behaviour

the identifier first login page is displayed without login_hint

Current behaviour

the identifier first login page is called with login_hint so the form is automatically validated

@patelami
Copy link

patelami commented Sep 26, 2022

Env: 3.15.x

Result: PASS

Given I have enabled ID first login
And I initiate the login flow
Then i should see username with the value in username field readonly mode
Then I click on switch account
And I add login_hint=a2 in parameter in URL
Then I should see a2 added to the login form in username field

switch_account_behaviour.mov

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

No branches or pull requests

3 participants