samples icon indicating copy to clipboard operation
samples copied to clipboard

`navigation_and_routing` to handle initial path before login

Open asashour opened this issue 4 years ago • 8 comments

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

asashour avatar Nov 01 '21 12:11 asashour

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

ramanjitsingh-hub avatar Nov 01 '21 17:11 ramanjitsingh-hub

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

redbrogdon avatar Nov 01 '21 23:11 redbrogdon

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.

johnpryan avatar Nov 01 '21 23:11 johnpryan

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.

redbrogdon avatar Nov 01 '21 23:11 redbrogdon

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.

asashour avatar Nov 02 '21 07:11 asashour

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

arteevraina avatar Jan 29 '22 16:01 arteevraina

The issue is still reprodubile.

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

asashour avatar Feb 01 '22 09:02 asashour

so is there any way to pass a redirect parameter ?

agelospanagiotakis avatar Aug 07 '23 21:08 agelospanagiotakis