-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Redirect to login page when session ends #23783
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
base: 5.x-dev
Are you sure you want to change the base?
Conversation
michalkleiner
left a comment
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.
Is there a way how to test this in a UI test? We can load a dashboard, log the user out or delete their session cookie or similar, and reload the UI with the expectation of them landing on the log in page.
…rized), then we redirect back to Login page. We logout the user properly so that nonce is reset
…page, we just redirect them now to login page and we show message there
… it might cause some regressions in plugins that load from external source
…f reloading the page
…messing around w/ nonce
…ame page after re-login
… we can grab it later on to compare when we do testing
… checking instead
sgiehl
left a comment
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.
I've did some further local testing on this one. While it works nicely when switching between menu entries it now fails with a generic error if you e.g. click on the refresh icon in a dashboard widget.
As everything should use the AjaxLoader to load content it should work for all cases when moving the 401 check here:
matomo/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts
Lines 535 to 540 in b26fa85
| }).fail((xhr: jqXHR) => { | |
| if (xhr.status === 429) { | |
| console.log(`Warning: the '${$.param(this.getParams)}' request was rate limited!`); | |
| reject(xhr); | |
| return; | |
| } |
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.
I've added the change here instead of in WidgetLoader
Thanks @sgiehl
Description
UX-305
We no longer want to show multiple error messages on screen when the session ends either with the user just leaving the computer for a long time or the session cookie was deleted. We want to redirect the user to login page when this happens
Please include a description of this change and which issue it fixes. If no issue exists yet please include context and what problem it solves.
Checklist
Review