-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
fix: Redirect on 401 #17597
fix: Redirect on 401 #17597
Conversation
…e/redirect_to_login
Codecov Report
@@ Coverage Diff @@
## master #17597 +/- ##
==========================================
- Coverage 68.86% 68.85% -0.01%
==========================================
Files 1598 1598
Lines 65297 65304 +7
Branches 6952 6953 +1
==========================================
+ Hits 44966 44967 +1
- Misses 18446 18451 +5
- Partials 1885 1886 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…cubator-superset into chore/redirect_to_login
superset-frontend/packages/superset-ui-core/src/connection/callApi/parseResponse.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great!
1 suggestion for a ux improvement in another PR - we should display a banner on login page that would inform user that their session expired
Tested 1 more scenario and I noticed that I'm not getting redirected back to the original page when I log in Screen.Recording.2021-12-07.at.11.18.50.mov |
…e/redirect_to_login
* Redirect on 401 * Bump FAB * Format * Update Cypress save test * Revert Cypress change * Bump FAB 3.4.1rc2 * Update test * Update return statement * Update api test * Update datasets api test * Update datasets api 401s to 403s * Add typeguard * Use Promise.resolve * Update callApiAndParseWithhTimeout test * Disable parseResponse test * Try catch * Handle npm 8 issues (cherry picked from commit 46cdc77)
🏷️ 2021.49 |
SUMMARY
Redirects the user to the login page when 401s responses are caught. It also passes the
next_url
param which is then used to redirect the user to the original page.AFTER
DEV.Superset.1.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION