hiteshchoudhary / chai-aur-react

chai aur react series on youtube
8.4k stars 1.09k forks source link

AppWrite account scope issue #100

Open AmitRazz2001 opened 7 months ago

AmitRazz2001 commented 7 months ago

appwrite issue This account scope issue not resolved even after adding a web platform on appwrite console..Need help to resolve this..

ghousetazeem commented 7 months ago

That may be because you are not using the correct API key or user authentication token, hopefully after debugging this, you should find the resolution.

If you already found the resolution, please do let me know!

AmitRazz2001 commented 7 months ago

That may be because you are not using the correct API key or user authentication token, hopefully after debugging this, you should find the resolution.

If you already found the resolution, please do let me know!

I'm using these keys only which is used in tutorial => appwriteUrl : String(import.meta.env.VITE_APPWRITE_URL), appwriteProjectId : String(import.meta.env.VITE_APPWRITE_PROJECT_ID), appwriteDatabaseId : String(import.meta.env.VITE_APPWRITE_DATABASE_ID), appwriteCollectionId : String(import.meta.env.VITE_APPWRITE_COLLECTION_ID), appwriteBucketId : String(import.meta.env.VITE_APPWRITE_BUCKET_ID) Any Api Keys weren't used..

JatinKumar1103 commented 7 months ago

did you solve this problem ?? i am also facing the same problem

AmitRazz2001 commented 7 months ago

did you solve this problem ?? i am also facing the same problem

That issue is not gone but my project is running fine.. Issue was there when I was trying to fetch the user's status from store Code with bug => const isAuthenticated = useSelector((state) => state.auth.status) // This gives me undefined auth

resolved code => const isAuthenticated = useSelector((state) => state.status)

pritamduttaofficial commented 7 months ago

Try this in the store.js file

const store = configureStore({ reducer: { auth: authSlice }, });

JatinKumar1103 commented 7 months ago

thanks guys my error was resolved i was doing other mistake

ashukr07 commented 6 months ago

did you solve this problem ?? i am also facing the same problem

That issue is not gone but my project is running fine.. Issue was there when I was trying to fetch the user's status from store Code with bug => const isAuthenticated = useSelector((state) => state.auth.status) // This gives me undefined auth

resolved code => const isAuthenticated = useSelector((state) => state.status)

where did you wrote the resolved code??

Rukshanda commented 5 months ago

image

I'm also getting this account scope issue. Is there anyone who could tell how to resolve it..

I have added correct API key and user authentication token key.

Amisha-028 commented 5 months ago

Screenshot 2024-06-20 015832 can anyone help with this

JainishParekh commented 4 months ago

@Rukshanda if the error is because of trying to use account.get() when the user is not logged in. So this can be handled using a catch error block in the app component or any other component where such access to the API is done.

I hope this was helpful.