Browse Source

📝 Update `security/first-steps.md` (#11673)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
pull/11674/head
Alejandra 10 months ago
committed by GitHub
parent
commit
3641c1ea55
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      docs/en/docs/tutorial/security/first-steps.md

8
docs/en/docs/tutorial/security/first-steps.md

@ -45,18 +45,18 @@ Copy the example in a file `main.py`:
## Run it
!!! info
First install <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>.
The <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a> package is automatically installed with **FastAPI** when you run the `pip install fastapi` command.
E.g. `pip install python-multipart`.
However, if you use the `pip install fastapi-slim` command, the `python-multipart` package is not included by default. To install it manually, use the following command:
This is because **OAuth2** uses "form data" for sending the `username` and `password`.
`pip install python-multipart`
Run the example with:
<div class="termy">
```console
$ uvicorn main:app --reload
$ fastapi dev main.py
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```

Loading…
Cancel
Save