From b1519b865df081e25accaceda288bc88761f9a33 Mon Sep 17 00:00:00 2001 From: Evan Zhang Date: Wed, 30 Jul 2025 11:35:38 -0400 Subject: [PATCH] Persist OIDC logins on HTTP refresh (#105) This relates to #70, where refreshing the webpage causes the user to need to login again, due to homeassistant not storing the user's session token `hassTokens`. --- custom_components/auth_oidc/endpoints/finish.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/auth_oidc/endpoints/finish.py b/custom_components/auth_oidc/endpoints/finish.py index 7736658..4addd9f 100644 --- a/custom_components/auth_oidc/endpoints/finish.py +++ b/custom_components/auth_oidc/endpoints/finish.py @@ -41,7 +41,7 @@ class OIDCFinishView(HomeAssistantView): # Return redirect to the main page for sign in with a cookie return web.HTTPFound( - location="/", + location="/?storeToken=true", headers={ # Set a cookie to enable autologin on only the specific path used # for the POST request, with all strict parameters set