
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
- Need help setting up this error is showi...
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy. If you're the app developer, register the redirect URI in the Google Cl...
- Appwrite stopped working, I can't authen...
I'm having an issue with Appwrite. It was working fine just a while ago, but suddenly it stopped working for me and can't authenticate accounts. I even went bac...
- Fail to receive the verification email a...
I added my email address to prevent it from showing "appwrite," but now I'm not receiving emails for verification or password resets. The function appears to be...
