Skip to content

Commit 6914c5c

Browse files
committed
Add request cookies to login flow context dict
Adds cookies from the aiohttp Request object associated with the request to POST /auth/login_flow. This is useful if an auth provider operates on data provided through cookies by an external system. Example use-case: * Reverse proxy handles authentication ands sets a JWT in a cookie upon success. HomeAssistant can allow access after validating this JWT.
1 parent 9df5c0a commit 6914c5c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

homeassistant/components/auth/login_flow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ async def post(self, request, data):
177177
handler,
178178
context={
179179
"ip_address": request[KEY_REAL_IP],
180+
"cookies": request.cookies,
180181
"credential_only": data.get("type") == "link_user",
181182
},
182183
)

0 commit comments

Comments
 (0)