Skip to content
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

navigation_and_routing to handle initial path before login #947

Open
asashour opened this issue Nov 1, 2021 · 8 comments
Open

navigation_and_routing to handle initial path before login #947

asashour opened this issue Nov 1, 2021 · 8 comments
Labels
Milestone

Comments

@asashour
Copy link
Contributor

asashour commented Nov 1, 2021

Would the below scenario add a value to the sample:

  1. The user opens the web browser with /book/3
  2. The web app redirects to /signin
  3. Sign in

Expected

  • The app redirects to /book/3

Actual

  • The app redirects to /books/popular
@ramanjitsingh-hub
Copy link

I want to work on this problem can i be assigned to this problem

@RedBrogdon
Copy link
Contributor

@johnpryan, since this was your sample originally, I'd love to have your opinion on this.

@RedBrogdon RedBrogdon added the p2 label Nov 1, 2021
@RedBrogdon RedBrogdon added this to the Backlog milestone Nov 1, 2021
@johnpryan
Copy link
Contributor

johnpryan commented Nov 1, 2021

Makes sense, the way I would do this is to add a redirect query parameter when the app navigates to /signin. So instead of /signin it would be /signin?redirect=/books/3.

@RedBrogdon
Copy link
Contributor

It looks like there may be two people interested in implementing this.

@asashour, you were the first to suggest the change, so if you're interested in implementing it, I'll leave it to you.

@asashour
Copy link
Contributor Author

asashour commented Nov 2, 2021

Thanks all for your feedback.

@ramanjitsingh-hub please go ahead, I hope one week is enough to raise a PR.

If you want more ideas, we can have an error message when the username/password is empty, or tests to be added for the login or the navigation. As mentioned in CONTRIBUTING, it is better to discuss the changes before spending time implementing them.

@arteevraina
Copy link
Contributor

Hi @RedBrogdon Is this issue still there in the app? I am not able to reproduce the scenario mentioned by @asashour .

@asashour
Copy link
Contributor Author

asashour commented Feb 1, 2022

The issue is still reprodubile.

The initial URL should be something like http://localhost:56422/#/book/3.

@agelospanagiotakis
Copy link

so is there any way to pass a redirect parameter ?

sasanktumpati added a commit to sasanktumpati/samples that referenced this issue Mar 24, 2024
…ter#947 )

This commit introduces a new functionality in the navigation_and_routing module. Now, if a user tries to access a specific route before logging in, the application will remember this initial route. After the user logs in, they will be redirected back to this initial route instead of a default route.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants