Skip to main content

Securing a website route / component

You may want to prevent rendering of some part of UI, or a route, when there's no session.

To achieve that, wrap the component tree in SessionAuth. When there's no session, this component will redirect the user to the login page.

Do you use react-router-dom?
YesNo
What type of UI do you want to use?
Custom UI
Pre built UI