Validate user session

As all the functionalities in our app are related to the user permissions, we need to validate the user session before grating user navigation, that way we're able to obtain all the necessary data related to the user access to the app views and functionalities.

As expected, if the user session is not valid access to the app data won’t be granted.

Get user access permissions

If the retrieved information about the user permissions is valid then it’s possible to load all the app data related to:

Initializing Security data

Another fact is that the Security library preloads all the required data before showing an app’s view, allowing us to enhance user experience while we avoid displaying empty spaces (ex. while the data related to menu options is loading) or even white screens to the final user for a long time.

Refresh token

When we create the user session, a refresh token is created to help modify and create the existing session.

Thus, the refresh token helps us to keep and refresh the user session depending on the following 3 cases: