-
Notifications
You must be signed in to change notification settings - Fork 57
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!(frontend): reload the page on login / logout success #2432
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2432 +/- ##
==========================================
- Coverage 95.13% 95.02% -0.11%
==========================================
Files 66 66
Lines 4524 4546 +22
Branches 648 658 +10
==========================================
+ Hits 4304 4320 +16
- Misses 179 182 +3
- Partials 41 44 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
6b4acde
to
2cd96d0
Compare
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.
Can't say much about the implementation, but the issues that caused tests failures due to unexpected redirect to login page, seem to be fixed by using the newly introduced onSuccess
callback to store authentication details.
Good job!
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.
LGTM
(I cannot approve my own PR)
Quality Gate passedIssues Measures |
* refactor: prefer full page reload instead of AJAX request on logout * Revert "refactor: prefer full page reload instead of AJAX request on logout" This reverts commit 47880c1. * fix: reload the page on login / logout success * fix: restore Spring CSRF handling * fix: normalize redirect as path * test: prevent flackyness of parallel security tests * fix(frontend): support context path in redirects * chore: cleanup * test(security): verify server-side logout redirect location * test(security): make tests more reliable * fix: normalize default redirect URL * test(security): expect page reload from API * chore: Java formatting * fix: more accurate normalize url * test(security): extra wait for page load * test(security): extra wait for page load * test(security): extra wait for page load * test(security): more explicit load waiting * chore: cleanup * test(security): fix load waiting * chore: Java formatting * test: add implicit wait * test: rollback asserting path, use builtin wait for main-view * test: assertin path using script * fix: reload with url mapping * test: wait for invalid session reloads * chore: remove test logger * test: extra wait on open * Revert "test: prevent flackyness of parallel security tests" This reverts commit 77721ae. * fix(frontend): prevent following requests when pageReloadNavigation is in use * Revert "test: add implicit wait" This reverts commit ed7d66d. * feat!(frontend): onSuccess login / logout callbacks for custom after-flows * test: use onSuccess callbacks * test: wait for load when asserting current URL * test: apply url mapping to logout path * chore(frontend): remove unnecessary .toString() * feat(frontend): support URL in login / logout options --------- Co-authored-by: Anton Platonov <platosha@gmail.com> Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
…P: 24.4) (#2481) feat!(frontend): reload the page on login / logout success (#2432) * refactor: prefer full page reload instead of AJAX request on logout * Revert "refactor: prefer full page reload instead of AJAX request on logout" This reverts commit 47880c1. * fix: reload the page on login / logout success * fix: restore Spring CSRF handling * fix: normalize redirect as path * test: prevent flackyness of parallel security tests * fix(frontend): support context path in redirects * chore: cleanup * test(security): verify server-side logout redirect location * test(security): make tests more reliable * fix: normalize default redirect URL * test(security): expect page reload from API * chore: Java formatting * fix: more accurate normalize url * test(security): extra wait for page load * test(security): extra wait for page load * test(security): extra wait for page load * test(security): more explicit load waiting * chore: cleanup * test(security): fix load waiting * chore: Java formatting * test: add implicit wait * test: rollback asserting path, use builtin wait for main-view * test: assertin path using script * fix: reload with url mapping * test: wait for invalid session reloads * chore: remove test logger * test: extra wait on open * Revert "test: prevent flackyness of parallel security tests" This reverts commit 77721ae. * fix(frontend): prevent following requests when pageReloadNavigation is in use * Revert "test: add implicit wait" This reverts commit ed7d66d. * feat!(frontend): onSuccess login / logout callbacks for custom after-flows * test: use onSuccess callbacks * test: wait for load when asserting current URL * test: apply url mapping to logout path * chore(frontend): remove unnecessary .toString() * feat(frontend): support URL in login / logout options --------- Co-authored-by: Vlad Rindevich <vladrin@vaadin.com> Co-authored-by: Anton Platonov <platosha@gmail.com> Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Fixes #2235
In addition, introduces
onSuccess
andnavigate
callbacks for custom authentication workflows, such as retrieving user info and offline storage.