You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/10/20 05:00:44 UTC

[GitHub] [apisix-dashboard] bzp2010 commented on a change in pull request #2179: fix: login repeat 2 times

bzp2010 commented on a change in pull request #2179:
URL: https://github.com/apache/apisix-dashboard/pull/2179#discussion_r732415948



##########
File path: web/src/pages/User/Login.tsx
##########
@@ -57,8 +57,16 @@ const Page: React.FC = () => {
               description: response.message,
               duration: 1,
               onClose: () => {
-                const redirect = getUrlQuery('redirect');
-                history.replace(redirect ? decodeURIComponent(redirect) : '/');
+                let redirect = getUrlQuery('redirect');
+                if (redirect) {
+                  redirect = decodeURIComponent(redirect);
+                  if (redirect === '/user/logout') {

Review comment:
       @liuxiran I failed to stably reproduce this problem and failed to find out the reason why `/user/logout` became a callback address. However, the current patch can alleviate this problem without affecting other scenarios.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org