1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

OAuth2 to use current request header (#43668)

This commit is contained in:
Paulus Schoutsen
2020-11-27 08:55:34 +01:00
committed by GitHub
parent 69c2818c56
commit f9fa24950b
18 changed files with 258 additions and 90 deletions

View File

@@ -71,7 +71,13 @@ async def test_config_reauth_profile(
)
# pylint: disable=protected-access
state = config_entry_oauth2_flow._encode_jwt(hass, {"flow_id": result["flow_id"]})
state = config_entry_oauth2_flow._encode_jwt(
hass,
{
"flow_id": result["flow_id"],
"redirect_uri": "https://example.com/auth/external/callback",
},
)
client: TestClient = await aiohttp_client(hass.http.app)
resp = await client.get(f"{AUTH_CALLBACK_PATH}?code=abcd&state={state}")