Skip to content

feat: implement post-authentication redirect via redirect_after_login parameter#2890

Open
Arav-Menon wants to merge 4 commits intocinnyapp:devfrom
Arav-Menon:feat/redirect-after-login
Open

feat: implement post-authentication redirect via redirect_after_login parameter#2890
Arav-Menon wants to merge 4 commits intocinnyapp:devfrom
Arav-Menon:feat/redirect-after-login

Conversation

@Arav-Menon
Copy link
Copy Markdown

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:

  1. Make a link to the login. Register page, with the redirect parameter:

http://localhost:3000/#/login?redirect_after_login=%23%2Fhome%2Froom%2F!roomid%3Aexample.com

  1. Log in. Register.

  2. Check that the app sends you to the room you wanted to go to after you log in.

@github-actions
Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant