Integrate with Home Assistant
Support level: Community
What is Home Assistant?
Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.
Preparation
The following placeholders are used in this guide:
hass.companyis the FQDN of the Home Assistant installation.authentik.companyis the FQDN of the authentik installation.
This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application.
Home Assistant does not include built-in support for SSO protocols. This guide covers two community-maintained OpenID Connect integrations:
Choose one integration before continuing, then use the matching tab in the authentik and Home Assistant configuration sections.
authentik configuration
In authentik versions earlier than 2026.5, all Redirect URIs are automatically treated as Authorization type. If you are using one of these older authentik versions, add only the Authorization URL to your Redirect URIs and do not configure a Post Logout URI.
To support the integration of Home Assistant with authentik, you need to create an application/provider pair in authentik.
- christiaangoossens/hass-oidc-auth
- cavefire/hass-openid
Create an application and provider
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Applications > Applications and click New Application to open the application wizard.
- Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Note the application Slug because you will use it later as
<application_slug>. - Choose a Provider type: select OAuth2/OpenID Connect as the provider type.
- Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
- Note the Client ID and Client Secret values because they will be required later.
- Add a Redirect URI of type
StrictAuthorizationashttps://hass.company/auth/oidc/callback. - Set Signing Key to any available signing key.
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's Application Dashboard page.
- Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Note the application Slug because you will use it later as
- Click Submit to save the new application and provider.
Create an application and provider
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Applications > Applications and click New Application to open the application wizard.
- Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Note the application Slug because you will use it later as
<application_slug>. - Choose a Provider type: select OAuth2/OpenID Connect as the provider type.
- Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
- Note the Client ID and Client Secret values because they will be required later.
- Add a Redirect URI of type
StrictAuthorizationashttps://hass.company/auth/openid/callback. - Set Signing Key to any available signing key.
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's Application Dashboard page.
- Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Note the application Slug because you will use it later as
- Click Submit to save the new application and provider.
Home Assistant configuration
- christiaangoossens/hass-oidc-auth
- cavefire/hass-openid
UI configuration
- Install OpenID Connect/SSO Authentication from HACS.
- Restart Home Assistant if HACS asks you to do so.
- Log in to Home Assistant as an administrator and go to Settings > Devices & Services.
- Click Add Integration and select OpenID Connect/SSO Authentication.
- Select the authentik provider from the pre-configured providers.
- Set Discovery URL to
https://authentik.company/application/o/<application_slug>/.well-known/openid-configuration. - Continue after Home Assistant successfully validates the discovery URL.
- Enter the Client ID and Client Secret from authentik.
- Configure the group and user-linking options for your Home Assistant deployment, then finish the setup.
Only enable automatic user linking while migrating existing Home Assistant users to OIDC. Disable it again after the users are linked.
YAML configuration
To configure the integration with YAML instead of the Home Assistant UI, add the following to your Home Assistant configuration:
auth_oidc:
client_id: <Client ID from authentik>
client_secret: !secret authentik_client_secret
discovery_url: "https://authentik.company/application/o/<application_slug>/.well-known/openid-configuration"
Restart Home Assistant after changing configuration.yaml. For advanced options, such as role mapping, user linking, TLS settings, and public-client configuration, refer to the hass-oidc-auth YAML configuration guide linked in the resources section.
UI configuration
- Install OpenID / OAuth2 authentication from HACS.
- Restart Home Assistant if HACS asks you to do so.
- Log in to Home Assistant as an administrator and go to Settings > Devices & Services.
- Click Add Integration and select OpenID / OAuth2 authentication.
- Select Use configure URL.
- Set Configure URL to
https://authentik.company/application/o/<application_slug>/.well-known/openid-configuration. - Review the discovered provider endpoints and continue.
- Enter the Client ID and Client secret from authentik.
- Configure the identity mapping and advanced options for your Home Assistant deployment, then finish the setup.
Only enable Block other login methods after you have confirmed that OpenID login works, otherwise you can lock yourself out of Home Assistant.
Legacy YAML configuration
The Home Assistant UI config flow is the recommended setup method for hass-openid. If you still use the legacy YAML configuration, add the following to your Home Assistant configuration:
openid:
client_id: <Client ID from authentik>
client_secret: <Client Secret from authentik>
configure_url: "https://authentik.company/application/o/<application_slug>/.well-known/openid-configuration"
Restart Home Assistant after changing configuration.yaml.
Configuration verification
To confirm that authentik is properly configured with Home Assistant, open Home Assistant and start an SSO login with the integration you configured. You should be redirected to authentik and then back to Home Assistant after successful authentication.