Redirect native-picker click on OIDC provider to /auth/oidc/welcome (fix dead-end) (#266)
Fixes #252
This commit is contained in:
@@ -19,6 +19,8 @@ from custom_components.auth_oidc import DOMAIN
|
||||
from custom_components.auth_oidc.config.const import (
|
||||
DISCOVERY_URL,
|
||||
CLIENT_ID,
|
||||
DEFAULT_TITLE,
|
||||
DISPLAY_NAME,
|
||||
FEATURES,
|
||||
FEATURES_AUTOMATIC_PERSON_CREATION,
|
||||
FEATURES_AUTOMATIC_USER_LINKING,
|
||||
@@ -58,6 +60,24 @@ async def test_setup_success_auth_provider_registration(hass: HomeAssistant):
|
||||
assert auth_providers[0].support_mfa is False
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_provider_name_is_stable_regardless_of_display_name(hass: HomeAssistant):
|
||||
"""CONF_NAME stays at DEFAULT_TITLE so injection.js can match the picker
|
||||
row regardless of the configured display_name."""
|
||||
await setup(
|
||||
hass,
|
||||
{
|
||||
CLIENT_ID: "dummy",
|
||||
DISCOVERY_URL: "https://example.com/.well-known/openid-configuration",
|
||||
DISPLAY_NAME: "Custom / Branded IdP",
|
||||
},
|
||||
True,
|
||||
)
|
||||
|
||||
provider = hass.auth.get_auth_providers(DOMAIN)[0]
|
||||
assert provider.name == DEFAULT_TITLE
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_provider_ip_fallback_fails_closed_without_request_context(
|
||||
hass: HomeAssistant,
|
||||
|
||||
Reference in New Issue
Block a user