added redirect after login#325
Merged
orangecoding merged 1 commit intoJun 9, 2026
Merged
Conversation
The old behaviour was: You open a page without being authorized, you are getting redirected to /login that redirects you after a successful authentication to /dashboard. This is really annoying if you want to open listenings directly from your notification adapter for example. This commit introduces a method to redirect you back to the original page you opened after the authentication process by adding the navigation of the opened page as state to the navigation to /login. The login component than unpacks the state that contains the old navigation and redirects the user back to path from the original navigation. The path /dashboard is used as a fallback if no navigation in the state is present.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The old behaviour was: You open a page without being authorized, you are getting redirected to /login that redirects you after a successful authentication to /dashboard. This is really annoying if you want to open listenings directly from your notification adapter for example. This pull request introduces a method to redirect you back to the original page you opened after the authentication process by adding the navigation of the opened page as state to the navigation to /login. The login component than unpacks the state that contains the old navigation and redirects the user back to path from the original navigation. The path /dashboard is used as a fallback if no navigation in the state is present.
Freel free to write me if you have any questions or ideas to change here.