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
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...