Skip to content

Commit cc28bda

Browse files
authoredOct 13, 2023
Level up the cookie security (GH-29)
2 parents 3a82fae + c987c1c commit cc28bda

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎src/fastapi_oauth2/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.0-beta.2"
1+
__version__ = "1.0.0-beta.3"

‎src/fastapi_oauth2/core.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ async def token_redirect(self, request: Request, **kwargs) -> RedirectResponse:
132132
value=f"Bearer {access_token}",
133133
max_age=request.auth.expires,
134134
expires=request.auth.expires,
135-
httponly=request.auth.http,
135+
secure=not request.auth.http,
136+
httponly=True,
136137
)
137138
return response
138139

0 commit comments

Comments
 (0)
Please sign in to comment.