How to handle isolated protected routes with react navigation #10557
Unanswered
crisfcodes
asked this question in
Q&A
Replies: 2 comments
-
Hello, did you manage to solve this problem? I am also stuck with the same issue. I think creating an AuthNavigator inside the RootNavigator might solve this problem and allow us to handle navigation through route.params. However, I am not sure if this is the right approach or what happens with the auth navigation. Can users return to it? I hope we can get a response soon so I can determine if this is the correct solution |
Beta Was this translation helpful? Give feedback.
0 replies
-
I facing same issue have you figure out how to do this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am developing an app in which certain screens/features along the application need to be protected(accessed only for authenticated users).The react-navigation docs shows an auth flow, this example is useful for those cases where it's mandatory to go through the login to be able to access all the application content. (render a set of screens if the user is logged in or not)
What I want is to protect specific screens where the user can run specific actions(like save a product) and only at that point redirect him to a login screen, if the user is successfully authenticated, redirect him to the point where he left off the flow. An important thing to highlight is, users can use the app and see some screens(product list/product detail) without being logged in. Here a simple image to illustrate the use case:
it is not clear to me how I can implement this authentication flow.
Beta Was this translation helpful? Give feedback.
All reactions