<Authenticated /> Best Practice
I am relatively new to Next and am working on setting up a project using Cognito/Amplfy v5. I have my auth provider set up and am wrapping my protected routes in <Authenticated />.
I want to have every route except from /login, /reset-password, etc configured to be behind <Authenticated /> by default, such that I don't need to define it in the layout file for every page and any route not aforementioned will redirect to /login . Is there a way to do this that would follow internal best practices?
I want to have every route except from /login, /reset-password, etc configured to be behind <Authenticated /> by default, such that I don't need to define it in the layout file for every page and any route not aforementioned will redirect to /login . Is there a way to do this that would follow internal best practices?
