Skip to content

Fix password reset redirect loop by clearing redirect_uri on logout#8291

Draft
Copilot wants to merge 4 commits into3.0from
copilot/fix-login-loop-after-password-reset
Draft

Fix password reset redirect loop by clearing redirect_uri on logout#8291
Copilot wants to merge 4 commits into3.0from
copilot/fix-login-loop-after-password-reset

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 13, 2026

After successfully changing password, users were redirected to /login?redirect_uri=/update-password, creating an infinite loop on subsequent login.

Changes

builder6/webapp/src/pages/updatePassword.jsx

  • Replace broken GlobalAction.emitUserLoggedOutEvent('/login') with explicit navigation to /logout?redirect_uri=/login
  • Add withRouter HOC to provide navigate prop to class component
  • Import useLocation and useNavigate hooks from react-router

Before

// Used non-functional redirect() meant for data router loaders
GlobalAction.emitUserLoggedOutEvent('/login');

After

// Explicit redirect chain that clears update-password from redirect_uri
this.props.navigate('/logout?redirect_uri=/login');

The logout page now receives an explicit /login redirect target, preventing the previous redirect_uri to /update-password from persisting through the logout flow.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug]: 3.0 用户修改密码成功后跳到重新登录页面,再次登录还是重置密码页面,死循环了</issue_title>
<issue_description>### Description

重置密码后,重新登录页地址是:rooturl/login?redirect_uri=%2Fupdate-password

Steps To Reproduce 重现步骤

1、用户修改密码,后强制登录出,重新登录;rooturl/login?redirect_uri=%2Fupdate-password
2、重新输入新的密码登录后,再次进入到重置页面,这样一直循环

Version 版本

3.0</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix login loop after password reset in version 3.0 Fix password reset redirect loop by clearing redirect_uri on logout Jan 13, 2026
Copilot AI requested a review from lizheng-steedos January 13, 2026 09:06
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.

[Bug]: 3.0 用户修改密码成功后跳到重新登录页面,再次登录还是重置密码页面,死循环了

2 participants