Skip to content

A Home Assistant Authentication Provider that can use Open ID

License

Notifications You must be signed in to change notification settings

allenporter/home-assistant-openid-auth-provider

Repository files navigation

home-assistant-openid-auth-provider

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.

Development Status

This custom component packages previous work done by others:

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

Pre-requisites

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.

Configuration

  1. Install this custom component using HACS
  2. Configure the OpenID Auth Provider integration
  3. Pick a name, set the URL for the IDP, and set the Client ID and Client Secret
  4. 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.

Usage

The login page should now show an additional login option to use the IDP:

Development

  1. Prepare virtual environment

    $ uv venv
    $ source .venv/bin/activate
    $ uv pip install -r requirements_dev.txt
  2. Run tests

    $ py.test
  3. Prepare Home Assistant environment

    $ export PYTHONPATH="${PYTHONPATH}:${PWD}"  # Allows loading custom_components
    $ hass --script ensure_config -c config
  4. Run Home Assistant

    $ hass -c config

About

A Home Assistant Authentication Provider that can use Open ID

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published