
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
- Flutter OAuth2 Google does not return to...
When the flow starts, the browser opens, I select an account, and it keeps showing: """ Page not found The page you're looking for doesn't exist. `general_rout...
- Email Verification Email
Hi everyone, I’m currently experiencing an issue with the email verification functionality. When I trigger the verification, the request returns a valid respon...
- Persistent 401 Unauthorized on all authe...
Hello, I'm facing a critical 401 Unauthorized error on my admin panel app and have exhausted all debugging options. The Problem: When my React app on localhos...
