Fix 500 on redirect path (#201)
* Fix 500 on redirect path Co-authored-by: anntnzrb <anntnzrb@proton.me>
This commit is contained in:
committed by
Christiaan Goossens
parent
f53c16b20e
commit
653c716ea8
@@ -24,11 +24,14 @@ class OIDCRedirectView(HomeAssistantView):
|
||||
async def get(self, _: web.Request) -> web.Response:
|
||||
"""Receive response."""
|
||||
|
||||
try:
|
||||
redirect_uri = get_url("/auth/oidc/callback", self.force_https)
|
||||
auth_url = await self.oidc_client.async_get_authorization_url(redirect_uri)
|
||||
|
||||
if auth_url:
|
||||
return web.HTTPFound(auth_url)
|
||||
raise web.HTTPFound(auth_url)
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
view_html = await get_view(
|
||||
"error",
|
||||
|
||||
Reference in New Issue
Block a user