-
Notifications
You must be signed in to change notification settings - Fork 810
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
feat: remove token when get Unauthorized #4193
feat: remove token when get Unauthorized #4193
Conversation
Signed-off-by: Mohammad Jamshidi <jamshidi.m799@gmail.com>
Signed-off-by: Mohammad Jamshidi <jamshidi.m799@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
/lgtm I also fixed a problem where the auth interceptor needed to be reset before clearing the token. Other changes are LGTM. Thank you for the contribution, @jamshidi799! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: g1eny0ung The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
New changes are detected. LGTM label has been removed. |
Your welcome, Thank you for the review. |
/cherrypick release-2.6 |
@g1eny0ung: #4193 failed to apply on top of branch "release-2.6":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
* feat: remove token when get Unauthorized Signed-off-by: Mohammad Jamshidi <jamshidi.m799@gmail.com> * update CHANGELOG.md Signed-off-by: Mohammad Jamshidi <jamshidi.m799@gmail.com> * fix: clear all connected caches Signed-off-by: Yue Yang <g1enyy0ung@gmail.com> * fix: resetAPIAuthentication Signed-off-by: Yue Yang <g1enyy0ung@gmail.com> --------- Signed-off-by: Mohammad Jamshidi <jamshidi.m799@gmail.com> Signed-off-by: Yue Yang <g1enyy0ung@gmail.com> Co-authored-by: Yue Yang <g1enyy0ung@gmail.com>
* feat: remove token when get Unauthorized Signed-off-by: Mohammad Jamshidi <jamshidi.m799@gmail.com> * update CHANGELOG.md Signed-off-by: Mohammad Jamshidi <jamshidi.m799@gmail.com> * fix: clear all connected caches Signed-off-by: Yue Yang <g1enyy0ung@gmail.com> * fix: resetAPIAuthentication Signed-off-by: Yue Yang <g1enyy0ung@gmail.com> --------- Signed-off-by: Mohammad Jamshidi <jamshidi.m799@gmail.com> Signed-off-by: Yue Yang <g1enyy0ung@gmail.com> Co-authored-by: Yue Yang <g1enyy0ung@gmail.com>
What problem does this PR solve?
When the token expires, the dashboard will need you to manually delete the token from the settings section and log out. This PR deletes the token automatically when a 500 response code which includes Unauthorized text happens. After that, the dashboard will redirect to /#/dashboard path and it will show the Auth dialog.
Moreover, when I try to remove the token from the settings page, I face the below error which fixed by this PR.
Close #4170
What's changed and how it works?
Related changes
UI interface
Cherry-pick to release branches (optional)
Checklist
CHANGELOG
CHANGELOG.md
Tests
Side effects
DCO
If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it: