Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does withAuthenticationRequired protect the whole route hierarchy ? #1238

Open
devl-up opened this issue May 8, 2024 · 3 comments
Open

Does withAuthenticationRequired protect the whole route hierarchy ? #1238

devl-up opened this issue May 8, 2024 · 3 comments
Labels
question Further information is requested

Comments

@devl-up
Copy link

devl-up commented May 8, 2024

I have a question about the withAuthenticationRequired HOC.

Let's say my app has to be fully private, can I wrap my top level route component with it and will it protect all sub-routes ?

@pamapa
Copy link
Member

pamapa commented May 13, 2024

The component passed into withAuthenticationRequired will be protected.

@devl-up
Copy link
Author

devl-up commented May 13, 2024

@pamapa I get that, but will navigation to nested components trough a router be protected too ?

@pamapa pamapa added the question Further information is requested label May 14, 2024
@Chiyo-no-sake
Copy link

@devl-up From what I understood whenever that component is rendered it will require authentication, so if you have the component only in a route/page of the router only that route will require authentication. To provide authentication to all routes in the router just render a parent component withAuthentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants