mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-20 08:12:16 +08:00
Automated deployment: Wed Dec 4 12:34:42 UTC 2019 49deb437a6ec71dc2cb88034f895dfff4b147fac
This commit is contained in:
@ -33,10 +33,12 @@ class User(BaseUser):
|
||||
pass
|
||||
|
||||
|
||||
auth = JWTAuthentication(secret=SECRET, lifetime_seconds=3600)
|
||||
auth_backends = [
|
||||
JWTAuthentication(secret=SECRET, lifetime_seconds=3600),
|
||||
]
|
||||
|
||||
app = FastAPI()
|
||||
fastapi_users = FastAPIUsers(user_db, auth, User, SECRET)
|
||||
fastapi_users = FastAPIUsers(user_db, auth_backends, User, SECRET)
|
||||
app.include_router(fastapi_users.router, prefix="/users", tags=["users"])
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user