Skip to main content

Auth Wrapper

Authwrapper is a configuration provided to the Feature, it takes a component AuthWrapper or AuthWrapperHoc in mobile. The purpose of this wrapper is to validate whether the user is authenticated to access the component else it will get redirected to login.

Configuration

If you want that particular route should only be accessible to logged in user you can simply pass auth: true while configuring the route as shown below

Route Config

For mobile, authWrapper works in the similar fashion but the route config can have another property which will be UnAuthenticatedComponent which when provided will be rendered incase the user is unauthenticated and trying to access the route.

Unauthenticated Component