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
- Error: User (role: guests) missing scope...
I want to send a verification code to the user and the given phone number and check it and create a session right after the user entered the secret. For me that...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- [SOLVED] React Native Appwrite SDK not w...
So I'm trying to generate a unique ID using the ID.unique() and its generating properly, but its saying its longer than 36 characters but it isnt.. ```typescri...