feat: implement post-authentication redirect via redirect_after_login parameter#2890
Open
Arav-Menon wants to merge 4 commits intocinnyapp:devfrom
Open
feat: implement post-authentication redirect via redirect_after_login parameter#2890Arav-Menon wants to merge 4 commits intocinnyapp:devfrom
Arav-Menon wants to merge 4 commits intocinnyapp:devfrom
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
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.
When someone shares a link to join a room or community they usually get sent to the page after they log in. Then they have to find their way to where they wanted to go. This change makes it easier for people to get to where they want to go.
The solution is to add something called redirect_after_login to the login and register pages. When someone uses this the app will automatically send them to the place after they log in or register.
Here are the main things that changed:
I added redirect_after_login to the search parameters for login and register pages.
I made it so the app checks for this parameter soon as someone starts logging in.
I made sure the redirect_after_login parameter is not lost when people switch between the login and register pages.
I used something called afterLoginRedirectPath to store where the person wants to go. It is not forgotten during the login process.
To test this you can do the following:
http://localhost:3000/#/login?redirect_after_login=%23%2Fhome%2Froom%2F!roomid%3Aexample.com
Log in. Register.
Check that the app sends you to the room you wanted to go to after you log in.