How to do routing between login and home screen based on the user which has logged in

I am working on an app where I’ve built a login page with Firebase authentication.
I’ll be having a couple users. Based on the each user, I want to route them on a different screen upon login and authentication from firebase.

For eg: Two users A and B, if A logs in successfully then he should be shown Screen-1, and for user B on login he should be shown a different screen say Screen-2.

I am asking this because there will be some user specific functionalities.

Any help would be appreciated :slight_smile:

1 Like

The best approach in my opinion would be to introduce user roles in my opinion.

So in your case user A can have role a
User B can have role b.

With this setup you check the role of the user who logged in and route them to different screens.

Let me know if that helps.

1 Like

Thanks for the suggestion, I’ll surely try it and let you know if it fits.

1 Like