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 04:23:32 UTC
[GitHub] [apisix-dashboard] bzp2010 opened a new pull request #2179: fix: login repeat 2 times
bzp2010 opened a new pull request #2179:
URL: https://github.com/apache/apisix-dashboard/pull/2179
Please answer these questions before submitting a pull request, **or your PR will get closed**.
**Why submit this pull request?**
- [x] Bugfix
- [ ] New feature provided
- [ ] Improve performance
- [ ] Backport patches
**What changes will this PR take into?**
Fix login repeat 2 times bug.
**Related issues**
fix #2174
**Checklist:**
- [x] Did you explain what problem does this PR solve? Or what new features have been added?
- [ ] Have you added corresponding test cases?
- [ ] Have you modified the corresponding document?
- [ ] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first
--
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
[GitHub] [apisix-dashboard] bzp2010 merged pull request #2179: fix: login repeat 2 times
Posted by GitBox <gi...@apache.org>.
bzp2010 merged pull request #2179:
URL: https://github.com/apache/apisix-dashboard/pull/2179
--
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
[GitHub] [apisix-dashboard] bzp2010 commented on a change in pull request #2179: fix: login repeat 2 times
Posted by GitBox <gi...@apache.org>.
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
[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #2179: fix: login repeat 2 times
Posted by GitBox <gi...@apache.org>.
liuxiran commented on a change in pull request #2179:
URL: https://github.com/apache/apisix-dashboard/pull/2179#discussion_r732410376
##########
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:
may I ask when will the redirect === '/user/logout' @bzp2010 , can we avoid this situation? thanks
--
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
[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #2179: fix: login repeat 2 times
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2179:
URL: https://github.com/apache/apisix-dashboard/pull/2179#issuecomment-947327011
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2179?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2179](https://codecov.io/gh/apache/apisix-dashboard/pull/2179?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (89e55dc) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/0fc4be7d05e1eed66877a900c0acef7d7b46201d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0fc4be7) will **decrease** coverage by `0.10%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/2179?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #2179 +/- ##
==========================================
- Coverage 68.24% 68.13% -0.11%
==========================================
Files 127 127
Lines 3347 3352 +5
Branches 823 824 +1
==========================================
Hits 2284 2284
- Misses 1063 1068 +5
```
| Flag | Coverage Δ | |
|---|---|---|
| frontend-e2e-test | `68.13% <0.00%> (-0.11%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2179?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [web/src/pages/User/Login.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2179/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Vc2VyL0xvZ2luLnRzeA==) | `60.00% <0.00%> (-12.00%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2179?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2179?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0fc4be7...89e55dc](https://codecov.io/gh/apache/apisix-dashboard/pull/2179?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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