I do have one more doubt, this is my directory in my next.js 13 application and I'm using useEffect to check for auth and redirection but due to which if someone tries to access protected page, the content is visible for few seconds after that useEffect redirects if not authenticated, Instead I want to show loading state from loading.tsx file of protected route until it will check authentication
First, make sure you have permissions configured such that the user cannot retrieve data they don't have access to.
For the loading...you can start with loading = true and don't show any content. Then, after checking auth, set loading = false and then show the content.
Got it, Thanks for the help
[SOLVED] Check auth & redirection in Next.js 13 App Router with appwrite
Recommended threads
- Invalid token passed in the request
Hello, I have an issue using updateMagicURLSession. I send the email using sendMagicLink, which works fine. When i click the link in the email i get the invali...
- how can i make a relationship between a ...
i want to relate the $id from users auth table in appwrite with other column in my table user_profile. because is the same user... how can i have exactly the s...
- Google login on mobile not working
Hi the gg login auth in mobile not working. No error show. But the user couldnt login in Attached is the video. Desktop is working well and im using custom doma...