Skip to content

Commit 2b46e6a

Browse files
committed
GH-27: Set the appropriate Secure value for authorization cookie
1 parent 4009b0c commit 2b46e6a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/fastapi_oauth2/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ 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+
secure=not request.auth.http,
135136
httponly=True,
136137
)
137138
return response

0 commit comments

Comments
 (0)