colinhacks / next-firebase-ssr

An Next.js example repo for building authenticated pages with Firebase Authentication, cookies, and getServerSideProps
https://vriad.com/essays/nextjs-firebase-authentication
424 stars 61 forks source link

What is the best way to use this approach in multiple protected routes? #21

Open Nithur-M opened 2 years ago

Nithur-M commented 2 years ago

Should I write the same logic again and again to deny access to multiple protected routes for unauthenticated users? or is there any elegant way to deal with this?

Thank you.