
hey i am trying to follow along with this youtube tutorial. If I sign up a user, the user gets saved on appwrite in the auth and database section but i am not redirect to the logged in page and i dont get an user session cookie token (cookieFallback) in the local storage. The code is absolutely the same from the tutorial.
in the console i got a 401 error.

It's the use effect, you have to disable one of the lines. I forget which one

hey thanks for the answer. i tried everything with the useEffect. i dont get the cookieFallback.

Are you missing one line?

Hold up

useEffect(() => {
const cookieFallback = localStorage.getItem("cookieFallback");
if (
cookieFallback === "[]" ||
cookieFallback === null ||
cookieFallback === undefined
) {
navigate("/sign-in");
}
checkAuthUser();
}, []);

I believe the line that was causing me issues was, cookieFallback === null ||

i tried your code, the error is still the same, nothing changed 😦

Can you put a console.log(I'm here
) before the navigate("/sign-in")
?

Keep my code, because it's the correct one

I'm not sure if your useEffect is being triggered, because it's not creating a cookie for you

Can you delete your auth/user, restart your dev env, and try again

yeah its not getting triggered. the error occurs in the getAccount function in the appwrite/api file

Recommended threads
- Stuck in "deleting"
my parent element have relationship that doesnt exist and its stuck in "deleting", i cant delete it gives me error: Collection with the requested ID could not b...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
- Database Double Requesting Error.
I am getting error for creating new document in an collection with new ID.unique() then too getting error of existing document. When button is pressed one docum...
