mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 07:25:52 -05:00
Fix Withings authentication to leverage default redirect URI (#79158)
This commit is contained in:
@@ -201,14 +201,14 @@ class ComponentFactory:
|
||||
self._hass,
|
||||
{
|
||||
"flow_id": result["flow_id"],
|
||||
"redirect_uri": "http://127.0.0.1:8080/auth/external/callback",
|
||||
"redirect_uri": "https://example.com/auth/external/callback",
|
||||
},
|
||||
)
|
||||
assert result["type"] == data_entry_flow.FlowResultType.EXTERNAL_STEP
|
||||
assert result["url"] == (
|
||||
"https://account.withings.com/oauth2_user/authorize2?"
|
||||
f"response_type=code&client_id={self._client_id}&"
|
||||
"redirect_uri=http://127.0.0.1:8080/auth/external/callback&"
|
||||
"redirect_uri=https://example.com/auth/external/callback&"
|
||||
f"state={state}"
|
||||
"&scope=user.info,user.metrics,user.activity,user.sleepevents"
|
||||
)
|
||||
|
||||
@@ -13,7 +13,10 @@ from tests.test_util.aiohttp import AiohttpClientMocker
|
||||
|
||||
@pytest.fixture()
|
||||
def component_factory(
|
||||
hass: HomeAssistant, hass_client_no_auth, aioclient_mock: AiohttpClientMocker
|
||||
hass: HomeAssistant,
|
||||
hass_client_no_auth,
|
||||
aioclient_mock: AiohttpClientMocker,
|
||||
current_request_with_host: None,
|
||||
):
|
||||
"""Return a factory for initializing the withings component."""
|
||||
with patch(
|
||||
|
||||
Reference in New Issue
Block a user