added samesite option for cookie authentication (#337)

* added samesite option for cookie authentication

* formatted with black and added documentation (grabbed from starlette.io documentation)
This commit is contained in:
SelfhostedPro
2020-09-29 22:27:25 -07:00
committed by GitHub
parent c5f53b73d1
commit 8adce74cd9
20 changed files with 112 additions and 32 deletions

View File

@ -59,7 +59,12 @@ jwt_authentication = JWTAuthentication(
)
fastapi_users = FastAPIUsers(
user_db, [jwt_authentication], User, UserCreate, UserUpdate, UserDB,
user_db,
[jwt_authentication],
User,
UserCreate,
UserUpdate,
UserDB,
)
app.include_router(
fastapi_users.get_auth_router(jwt_authentication), prefix="/auth/jwt", tags=["auth"]