mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
Add a migration doc for 2.0.0
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# 0.8.x ➡️ 1.0.x
|
||||
# 0.8.x ➡️ 1.x.x
|
||||
|
||||
1.0 version introduces major breaking changes that need you to update some of your code and migrate your data.
|
||||
|
||||
24
docs/migration/1x_to_2x.md
Normal file
24
docs/migration/1x_to_2x.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# 1.x.x ➡️ 2.x.x
|
||||
|
||||
## JWT authentication backend
|
||||
|
||||
To be fully compatible with Swagger authentication, the output of a successful login operation with the JWT authentication backend has changed:
|
||||
|
||||
**Before**
|
||||
|
||||
```json
|
||||
{
|
||||
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI"
|
||||
}
|
||||
```
|
||||
|
||||
**After**
|
||||
|
||||
```json
|
||||
{
|
||||
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI",
|
||||
"token_type": "bearer"
|
||||
}
|
||||
```
|
||||
|
||||
Make sure to update your clients to read the token in the right property.
|
||||
@@ -51,4 +51,5 @@ nav:
|
||||
- usage/routes.md
|
||||
- usage/dependency-callables.md
|
||||
- Migration:
|
||||
- migration/08_to_10.md
|
||||
- migration/08_to_1x.md
|
||||
- migration/1x_to_2x.md
|
||||
|
||||
Reference in New Issue
Block a user