Log out func is failing- acount.get() works in all other endpoints but here for some reason. I read the cookie, set the session and then delete the session doesnt work. Everything works until account.get() and deletesession(). Anyone know why?? how can it set a session that it can't delete in the same breath? error is : User (role: guests) missing scope (account)
Here is the api endpoint
async def logout( request: Request):
cookie= request.cookies.get('login')
print(cookie)
if not cookie :
raise HTTPException(status_code=401, detail="Already logged out")
try:
sessionclient.set_session(cookie)
account= Account(sessionclient)
print('session set')
account.get()
print('account gotten')
account.delete_session("current") ;
return { 'log out succesful'}```
Is it possible set_session() is failing?
And BTW, it’s best to format code by surrounding it by three backticks (```)
it doesnt fail, everything works until account.get()/deletesesssion()
maybe it should be done using admin client?* note- that didnt work either.
Recommended threads
- TEAM INVITE
There is a problem with the team invitation. When a user invites other users, that time, the newly created email address they don't get the invite link and old ...
- 500 simultaneous OAuth logins from the s...
Hi, I'd like to ask about rate limiting around Google OAuth login on Appwrite Cloud. **OVERVIEW** Service type: A PWA (web app) for members of a university clu...
- Websites hosted on my appwrite sites hav...
Hello, all my websites hosted on appwrite sites are not running I am getting this message "This site can’t be reached drivehub.appwrite.network took too long t...