A Home Assistant Authentication Provider that can use Open ID
This software is an unofficial custom component for Home Assistant. It is not developed, endorsed, or affiliated with the Home Assistant project. Use this software at your own risk.
While efforts have been made to ensure the security and functionality of this software, it may introduce vulnerabilities, compatibility issues, or unexpected behavior. By installing and using this software, you accept full responsibility for any outcomes or consequences.
If you have concerns about security, performance, or compatibility, please consider reviewing the code before installation and ensure it meets your standards. This software is provided "as is," without warranty of any kind.
This custom component packages previous work done by others:
- home-assistant/core#32926 by elupus
- home-assistant/frontend#14471 by christiaangoossens
The current status is that it also requires a Home Assistant Frontend PR to support external steps in the login flow which is in progress
You'll need an existing IDP set up. Here is an example setup for testing out OpenID Connect with DexIDP.
You'll need to create a new Client ID
and Client Secret
for Home Assistant and record those for use during setup.
The username
of the user in the IDP needs to match the username of a Home Assistant user you've created.
- Install this custom component using HACS
- Configure the OpenID Auth Provider integration
- Pick a name, set the URL for the IDP, and set the Client ID and Client Secret
- At the bottom of the configuration flow is a list of Emails or Subjects which are allowed to login. You can add users from the IDP to the allow list.
The login page should now show an additional login option to use the IDP:
-
Prepare virtual environment
$ uv venv $ source .venv/bin/activate $ uv pip install -r requirements_dev.txt
-
Run tests
$ py.test
-
Prepare Home Assistant environment
$ export PYTHONPATH="${PYTHONPATH}:${PWD}" # Allows loading custom_components $ hass --script ensure_config -c config
-
Run Home Assistant
$ hass -c config