Rank 1: Thread
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'}```