is there an example how to achieve login screen+ho...
# compose-android
c
is there an example how to achieve login screen+home screen navigation flow that includes deep link support? It seems Google ignore this case.. there no articles or project examples about a such conditional navigation. Am I wrong?
👍 1
I have a common login screen that navigates to Home screen. And I have some detail screen that can be opened via deep link. How I can manage the user isLoggedIn state? For example I click the deep link and it opens first the login screen, after authorization it navigates user to some detail screen via the deep link, and in case user was already logged in it navigates to the detail screen directly. I’ve described about it here as well https://stackoverflow.com/questions/76889706/android-jetpack-compose-auth-navigation-flow-with-deeplink-support
there is a good article about it but it doesn’t cover the deep linking https://www.ittybittyapps.com/blog/2022-10-19-navigation-compose/
@Ian Lake could you help me, please
d
Basically you should have your Home screen be your starting destination and let it decide if it needs to navigate to the Login screen. When Login is done it can pop back to Home. The same can be done for your deep link destination.