Back

Appwrite Authentication

  • 0
  • Self Hosted
  • Auth
  • Web
  • Cloud
Carre
20 Jun, 2024, 16:47

Hello, i am trying to make a secure login system to my website. I have completed Login and Signup so the user get saved to Auth page and Database. I am trying to secure some of my pages so you want access it without being logged in. I also want to make it so if the user is loggedin and trying to go to login or signin page he gets dedirectet to home page. I have made 2 maps, one Auth and one Root and wounder if there is any way to secure the folder and all the pages in it? What is the easiest way to make it work?

Thanks for the help, i am new to NextJS

TL;DR
Developers seeking help with securing pages in a NextJS website. They have implemented login and signup functionalities and want to restrict access to certain pages for logged-in users. They are looking for a way to protect a folder and its content. The easiest solution is to use a middleware function to check the user's authentication status before rendering protected pages.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more