When I run the api endpoint below i get an error: [1] User (role: guests) missing scope (account). I'm just trying to implenet auth with JWT. im a hobbyist self taught programmer. I feel like this should be quite simple going from the documentation but it's not working.
@app.post("/api/login", status_code=status.HTTP_200_OK) async def login( credentials : logincred ): try: email, password = credentials.email, credentials.password response = account.create_email_password_session(email, password) token= client.set_jwt() print(response) print(token)
return {'response': response }
  except Exception as e:
   
     print(e)
 raise HTTPException(status_code= status.HTTP_403_FORBIDDEN , detail='invalid username or password')  # Return an appropriate error status code
Recommended threads
- appwrite auth problem regarding the sess...
Hi, I have problem with auth. When I try to login/signup using OTP, at the end session.secret is empty, i have searched online and in the docs but i cannot find...
 - log out failure
I am trying to set up the user sign up/log in/log out and while I have got the sign up/log in to work, log out keeps failing. i am keeping it simple with only r...
 - OAuth login not working on deployed app ...
Hey there, I've been dealing with an issue where I cannot use OAuth on my deployed app - locally everything works fine. I am using react-router in Framework Mo...