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

Bug: Navigation Menu - Login Button Control: Link Includes A ReturnUrl Resulting In Navigating To ReturnUrl Loop (5.0.3 static SSR) #3766

Closed
thabaum opened this issue Feb 10, 2024 · 0 comments · Fixed by #3824

Comments

@thabaum
Copy link
Contributor

thabaum commented Feb 10, 2024

Issue

Login menu button is broken once you visit the login page. User will be navigated to the set ReturnUrl in navigation which is the homepage for this example. Once navigated to the homepage and a user clicks this control again it results in navigation to the same page you just returned to in a loop resulting in the Login Button Control.
https://github.com/oqtane/oqtane.framework/blob/dev/Oqtane.Client/Themes/Controls/Theme/Login.razor

Steps to reproduce

  1. Fire up VS with the latest dev 5.0.3 commit
  2. Install and switch to static rendering runtime.
  3. Click login, sends you to login page, click login while on that page you will notice the url as below, go to another page and notice that login url stays as shown resulting in not being able to access the login page using that menu button control.

image

Expected Behavior:

User will stay on login page when button is clicked. There is no need to set a return Url for the login button control while a user is visiting a page with a login UI page form component. In fact I can't think of a reason to ever include a return url on the Login button control. It should always navigate to the login page every time it is clicked.

Additional Context

  1. The login ReturnUrl should be removed if it has one already prior to applying it for all render modes. I can make strings of them long inside the browser.
  2. If you click on a button that navigates to the same page, the old return url value could stay the same or be cleared, along with keeping its ability to navigate to the page it is on instead of removing it and pretty much going to the homepage from login.
  3. I have not tested results from child pages. However the profile button while logged in, and the login button while logged out can display these behaviors currently.
@thabaum thabaum changed the title Bug: ReturnUrl feature is broken on login menu button 5.0.3 Dev Bug: ReturnUrl feature is broken on login menu button 5.0.3 Dev (static SSR) Feb 11, 2024
@thabaum thabaum changed the title Bug: ReturnUrl feature is broken on login menu button 5.0.3 Dev (static SSR) Bug: ReturnUrl feature is broken on login menu button (5.0.3 static SSR) Feb 12, 2024
@thabaum thabaum changed the title Bug: ReturnUrl feature is broken on login menu button (5.0.3 static SSR) Bug: Navigation Menu - Login Button Control: Clicking on this button while on login page navigates user to homepage(5.0.3 static SSR) Feb 12, 2024
@thabaum thabaum changed the title Bug: Navigation Menu - Login Button Control: Clicking on this button while on login page navigates user to homepage(5.0.3 static SSR) Bug: Navigation Menu - Login Button Control: Link Includes A ReturnUrl Resulting In Navigating To Homepage Loop(5.0.3 static SSR) Feb 12, 2024
@thabaum thabaum changed the title Bug: Navigation Menu - Login Button Control: Link Includes A ReturnUrl Resulting In Navigating To Homepage Loop(5.0.3 static SSR) Bug: Navigation Menu - Login Button Control: Link Includes A ReturnUrl Resulting In Navigating To Homepage Loop (5.0.3 static SSR) Feb 12, 2024
@thabaum thabaum changed the title Bug: Navigation Menu - Login Button Control: Link Includes A ReturnUrl Resulting In Navigating To Homepage Loop (5.0.3 static SSR) Bug: Navigation Menu - Login Button Control: Link Includes A ReturnUrl Resulting In Navigating To ReturnUrl Loop (5.0.3 static SSR) Feb 12, 2024
sbwalker added a commit that referenced this issue Feb 18, 2024
Ensure "login" route is included in login URL construction. Fixes #3766
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 a pull request may close this issue.

1 participant