Are you able to see the network request details
this?
No the account.get() call
Is it the last session cookie that came from Appwrite?
it gets called on page load by the middleware. so can't specify it from the console
what do u mean by the last session cookie?
The last time you created the email session.
maybe i'm too noob to understand what u saying. do u want me to remove the middleware code and do a successful login, and then again add the middleware code and then compare the before and after cookie values?
Sure that could work.
Or you can manually try to use that cookie value to make the request
yoo... they aren't same😐
That's not good. Maybe the value in your middleware is an old deleted session and that's why you're getting the error
sad... how can i solve this?
Are you making sure to clear things as necessary?
clear things as necessary? didn't get it
For example, deleting the cookie if it's not valid anymore
i'm deleting the cookies only when the user logs out. do i need to do anything more?
Maybe it's not getting deleted in all places or something. I don't know. I hate nextjs
after some digging, i found that when the middleware is on, we are not setting any new cookie value. till now what i was seeing was the cookie from the last session
Again...I hate nextjs 🤣
and after your suggestion on another post of mine, i handled the cookies manually in the /auth/oauth2/success path
that means my middleware is redirecting it from /auth/oauth2/success to / before the code of /auth/oauth2/success gets executed
okay, so I just found out I'm nothing but dumb. i had to add /auth/oauth2/success as a public route in the middleware
don't hate nextjs. hate me🙂
[SOLVED] user session is created, but currentUser still returns null
Still hate nextjs because of all these gotchas 😜 I'm glad you figured it out <:appwriteparty:946072712915341333>
Recommended threads
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...