Skip to content
Permalink
Browse files

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.
  • Loading branch information...
sidoh committed Sep 8, 2019
1 parent 9df5c0a commit 6914c5c55ac2ba688297ab60c8e4a1e64b0af8ab
Showing with 1 addition and 0 deletions.
  1. +1 −0 homeassistant/components/auth/login_flow.py
@@ -177,6 +177,7 @@ def __init__(self, flow_mgr, store_result):
handler,
context={
"ip_address": request[KEY_REAL_IP],
"cookies": request.cookies,
"credential_only": data.get("type") == "link_user",
},
)

0 comments on commit 6914c5c

Please sign in to comment.
You can’t perform that action at this time.