mirror of
				https://github.com/fastapi-users/fastapi-users.git
				synced 2025-11-04 14:45:50 +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:
		@ -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"]
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user