
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
- Suggest simple auth flow using just a cu...
Hi...i wanted to know how can we create a auth session using custom id and password. I can give each teacher and student some specific id and corresponding to ...
- Auth showing wrong numbers of users
I have 6 verified users but it shows 5 24 hours before I have 5 users that time its showing 4 users. Project ID: `68aed705001ef67ac979`
- Appwrite + Google OAuth session created,...
Hey everyone, I’m running into a weird issue with Appwrite’s Google OAuth provider and would love some insight. Here’s my setup: - **Stack:** React app...
