https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/ or
https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/
When following either tutorial from above, a bad request is sent when clicking the localhost:8000/docs Authorize button using any username or password. Tried directly copying and pasting the code, the issue persists.
macOS
FastAPI 0.58.1
Python 3.7.7
Hello @davidmckayv - I'm just trying out FastAPI myself. Have you installed python-multipart?
pip install python-multipart
Then try with user johndoe and password secret.
Wow, I somehow missed the comment wherein it states this must be installed due to Ouath2 using "form data" for sending the username and password. All set.
@davidmckayv I'm glad it helped!
Thanks for the help here @shahinrostami ! :clap: :bow:
Thanks for reporting back and closing the issue @davidmckayv :+1:
It's my pleasure @tiangolo . Thank you for the excellent work on FastAPI 馃コ