mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-11-04 22:56:56 +08:00
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:
@ -57,7 +57,12 @@ jwt_authentication = JWTAuthentication(
|
||||
|
||||
app = FastAPI()
|
||||
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"]
|
||||
|
||||
Reference in New Issue
Block a user