Suppose, I have two users on this App (Teacher & Student). Their platform or home screen is different and so is the login, and registration section. Now I want the login status (student or teacher) to compare the splash screen to see who has the login and send it to its home screen. How can do this?enter image description here
2
Answers
You can make role-based authorization. Here is an example.
You need to assign a role each user, and then do the routing based on the role.
2 places where you can store the role information:
Always set the role from a trusted environment, otherwise your users will be able to change their own roles.
Once this is done, you can access the role information from your app and do role based authorization (in your case, routing)