Files
hass-oidc-auth/custom_components/auth_oidc/endpoints/welcome.py
Christiaan Goossens 0d61861343 UI Improvements (#7)
* Initial version with UI templates

* Implement basic screens

* Linting & bump to 0.3.0

* Tick off some TODOs
2024-12-27 16:52:32 +01:00

21 lines
586 B
Python

"""Welcome route to show the user the OIDC login button and give instructions."""
from aiohttp import web
from homeassistant.components.http import HomeAssistantView
from ..helpers import get_view
PATH = "/auth/oidc/welcome"
class OIDCWelcomeView(HomeAssistantView):
"""OIDC Plugin Welcome View."""
requires_auth = False
url = PATH
name = "auth:oidc:welcome"
async def get(self, _: web.Request) -> web.Response:
"""Receive response."""
view_html = await get_view("welcome")
return web.Response(text=view_html, content_type="text/html")