README updates for 1.0.0 (#250)
* Stable README changes * Simplify texts * Add link to FAQ * Add information about proxy setups * Syncing changes from README to FAQ * Improve wording * Remove outdated Usage Guide * Add placeholder usage guide
This commit is contained in:
committed by
GitHub
parent
7cc960e4db
commit
02babe0022
@@ -10,7 +10,10 @@ If you are not a programmer, you can still contribute by:
|
|||||||
- If you want to, contributing financially through [Github Sponsors](https://github.com/sponsors/christiaangoossens)
|
- If you want to, contributing financially through [Github Sponsors](https://github.com/sponsors/christiaangoossens)
|
||||||
|
|
||||||
## Code contributions
|
## Code contributions
|
||||||
You may also submit Pull Requests (PRs) to add features yourself! You can find a list that we are currently working on below. Please note that workflows will be run on your pull request and a pull request will only be merged when all checks pass and a review has been conducted (together with a manual test).
|
You may also submit Pull Requests (PRs) to add features yourself! You can find TODOs to work on in the [Issue Tracker](https://github.com/christiaangoossens/hass-oidc-auth/issues), the [Feature Requests](https://github.com/christiaangoossens/hass-oidc-auth/discussions/categories/ideas) and in the [FAQ](./docs/faq.md).
|
||||||
|
|
||||||
|
|
||||||
|
Please note that workflows will be run on your pull request (linting, tests, security audit) and a pull request will only be merged when all checks pass and a review has been conducted (together with a manual test).
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
This project uses the uv package manager for development. You can find installation instructions here: https://docs.astral.sh/uv/getting-started/installation/. Start by installing the dependencies using `uv sync` and then point your editor towards the environment created in the .venv directory.
|
This project uses the uv package manager for development. You can find installation instructions here: https://docs.astral.sh/uv/getting-started/installation/. Start by installing the dependencies using `uv sync` and then point your editor towards the environment created in the .venv directory.
|
||||||
|
|||||||
67
README.md
67
README.md
@@ -21,15 +21,14 @@
|
|||||||
<h3 align="center">OpenID Connect for Home Assistant</h3>
|
<h3 align="center">OpenID Connect for Home Assistant</h3>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
OpenID Connect (OIDC) implementation for Home Assistant through a custom component/integration
|
OpenID Connect (OIDC) implementation for Home Assistant through a custom component/integration,<br/>with a strong focus on <b>security, stability and accessibility.</b>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="./docs/usage.md">Usage Guide</a>
|
<a href="./docs/configuration.md">YAML Configuration Guide</a>
|
||||||
·
|
|
||||||
<a href="./docs/configuration.md">Configuration Guide</a>
|
|
||||||
·
|
·
|
||||||
<a href="./CONTRIBUTING.md">Contribution Guide</a>
|
<a href="./CONTRIBUTING.md">Contribution Guide</a>
|
||||||
<br />
|
·
|
||||||
|
<a href="./docs/faq.md">Frequently Asked Questions (FAQ)</a>
|
||||||
<br />
|
<br />
|
||||||
<a href="https://github.com/christiaangoossens/hass-oidc-auth/discussions?discussions_q=is%3Aopen+category%3AAnnouncements+category%3APolls">Announcements & Polls</a>
|
<a href="https://github.com/christiaangoossens/hass-oidc-auth/discussions?discussions_q=is%3Aopen+category%3AAnnouncements+category%3APolls">Announcements & Polls</a>
|
||||||
·
|
·
|
||||||
@@ -41,50 +40,60 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Provides an OpenID Connect (OIDC) implementation for Home Assistant through a custom component/integration. Through this integration, you can create an SSO (single-sign-on) environment within your self-hosted application stack / homelab.
|
Provides a **stable and secure** OpenID Connect (OIDC) implementation for Home Assistant through a custom component/integration. With this integration, you can create a single-sign-on (SSO) environment in your self-hosted application stack / homelab.
|
||||||
|
|
||||||
### Background
|
The core values for this integration are:
|
||||||
If you would like to read the background/open letter that lead to this component, you can find the original post at https://community.home-assistant.io/t/open-letter-for-improving-home-assistants-authentication-system-oidc-sso/494223. It is currently one of the most upvoted feature requests for Home Assistant.
|
|
||||||
|
1. **Security**: strict adherence to the [OpenID Connect specification](https://openid.net/specs/openid-connect-core-1_0.html), [RFC 6749 (OAuth2)](https://datatracker.ietf.org/doc/html/rfc6749), [RFC 7519 (JWT)](https://datatracker.ietf.org/doc/html/rfc7519), [RFC 7636 (PKCE)](https://datatracker.ietf.org/doc/html/rfc7636) and [RFC 9700 (OAuth2 Security Best Practices)](https://datatracker.ietf.org/doc/html/rfc9700) as well as a focus on security tests in the automated test suite.
|
||||||
|
2. **Stability**: minimal patching of the core Home Assistant code such that updates of HA are less likely to break the integration and leave you without a way to login.
|
||||||
|
3. **Accessibility**: the integration should work for everyone as much as possible with default settings, regardless of your preferred authentication method.
|
||||||
|
|
||||||
|
**TLDR**: *Login to Home Assistant with this integration should 'just work', every time, for everyone in your household ([even your dad](https://github.com/home-assistant/architecture/issues/832#issuecomment-1328052330)), securely.*
|
||||||
|
|
||||||
|
If you are deciding if this integration is the right fit for your setup, please see the [Frequently Asked Questions (FAQ)](./docs/faq.md) for more information.
|
||||||
|
|
||||||
> [!TIP]
|
|
||||||
> If you support the addition of this feature to the Home Assistant core, please upvote https://github.com/orgs/home-assistant/discussions/48. It's the successor of the Home Assistant Community post mentioned above (with almost 900 upvotes).
|
|
||||||
|
|
||||||
## Installation guide
|
## Installation guide
|
||||||
|
|
||||||
1. Add this repository to [HACS](https://hacs.xyz/) (or search for "OpenID Connect" in HACS).
|
The easiest way to install the integration is through [the Home Assistant Community Store (HACS)](https://hacs.xyz/). You can find usage instructions for HACS here: https://hacs.xyz/docs/use/.
|
||||||
|
|
||||||
|
After installing HACS, search for "OpenID Connect" in the HACS search box or click the button below:
|
||||||
|
|
||||||
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=christiaangoossens&repository=hass-oidc-auth&category=Integration)
|
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=christiaangoossens&repository=hass-oidc-auth&category=Integration)
|
||||||
|
|
||||||
2. Add the YAML configuration that matches your OIDC provider to `configuration.yaml`. See the [Configuration Guide](./docs/configuration.md) for more details or pick your OIDC provider below:
|
Next, setup your OIDC provider. You can find setup guides for common providers here:
|
||||||
|
|
||||||
| <img src="https://goauthentik.io/img/icon_top_brand_colour.svg" width="100"> | <img src="https://www.authelia.com/images/branding/logo-cropped.png" width="100"> | <img src="https://github.com/user-attachments/assets/4ceb2708-9f29-4694-b797-be833efce17d" width="100"> |
|
| <img src="https://goauthentik.io/img/icon_top_brand_colour.svg" width="100"> | <img src="https://www.authelia.com/images/branding/logo-cropped.png" width="100"> | <img src="https://github.com/user-attachments/assets/4ceb2708-9f29-4694-b797-be833efce17d" width="100"> |
|
||||||
|:-----------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------:|
|
|:-----------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------:|
|
||||||
| [Authentik](./docs/provider-configurations/authentik.md) | [Authelia](./docs/provider-configurations/authelia.md) | [Pocket ID](./docs/provider-configurations/pocket-id.md) |
|
| [authentik](./docs/provider-configurations/authentik.md) | [Authelia](./docs/provider-configurations/authelia.md) | [Pocket ID](./docs/provider-configurations/pocket-id.md) |
|
||||||
|
|
||||||
By default, the integration assumes you configure Home Assistant as a **public client** and thus only specify the `client_id` and no `client_secret`. For example, your configuration might look like:
|
You can also find additional provider guides in the [the Provider Configurations folder](./docs/provider-configurations). If your provider isn't specified, you can use either a **public client** (recommended) or **confidential client** with the callback url set to `<your HA URL>/auth/oidc/callback`.
|
||||||
|
|
||||||
```yaml
|
Finally, choose your preferred configuration style (UI or YAML). After configuration, you should automatically be sent to the OIDC login page(s) if you open Home Assistant (web or app).
|
||||||
auth_oidc:
|
|
||||||
client_id: "example"
|
|
||||||
discovery_url: "https://example.com/.well-known/openid-configuration"
|
|
||||||
```
|
|
||||||
|
|
||||||
When registering Home Assistant at your OIDC provider, use `<your HA URL>/auth/oidc/callback` as the callback URL and select 'public client'. You should now get the `client_id` and `issuer_url` or `discovery_url` to fill in.
|
### Configuration in the HA UI
|
||||||
|
|
||||||
3. Restart Home Assistant
|
The recommended setup method for beginners is through the "Integrations" panel within the Home Assistant UI.
|
||||||
|
|
||||||
4. Login through the OIDC Welcome URL at `<your HA URL>/auth/oidc/welcome`. You will have to go there manually for now. For example, it might be located at http://homeassistant.local:8123/auth/oidc/welcome.
|
Many configuration options are available through this method, but some advanced features are only available in YAML to simplify the setup process in the UI.
|
||||||
|
|
||||||
More (detailed) usage instructions can be found in the [Usage Guide](./docs/usage.md).
|
1. Open Home Assistant and go to **Settings -> Devices & Services**.
|
||||||
|
2. Click Add Integration and select **OpenID Connect/SSO Authentication**.
|
||||||
|
3. Follow the prompts on screen carefully.
|
||||||
|
|
||||||
|
### Configuration by YAML
|
||||||
|
|
||||||
|
Alternatively, you can configure the integration using YAML. You can find a full configuration guide for YAML here: [YAML Configuration Guide](./docs/configuration.md).
|
||||||
|
|
||||||
## Contributions
|
## Contributions
|
||||||
Contibutions are very welcome! If you program in Python or have worked with Home Assistant integrations before, please try to contribute. A list of requested contributions/future goals is in the [Contribution Guide](./CONTRIBUTING.md).
|
Contibutions are very welcome! If you program in Python or have worked with Home Assistant integrations before, please try to contribute. You can find more information in the [Contribution Guide](./CONTRIBUTING.md).
|
||||||
|
|
||||||
Please see the [Contribution Guide](./CONTRIBUTING.md) for more information.
|
### Security issue?
|
||||||
|
|
||||||
### Found a security issue?
|
|
||||||
Please see [SECURITY.md](./SECURITY.md) for more information on how to submit your security issue securely. You can find previously found vulnerablities and their corresponding security advisories at the [Security Advisories page](https://github.com/christiaangoossens/hass-oidc-auth/security/advisories).
|
Please see [SECURITY.md](./SECURITY.md) for more information on how to submit your security issue securely. You can find previously found vulnerablities and their corresponding security advisories at the [Security Advisories page](https://github.com/christiaangoossens/hass-oidc-auth/security/advisories).
|
||||||
|
|
||||||
|
## Background
|
||||||
|
If you would like to read the background/open letter that lead to this component, you can find it at https://github.com/orgs/home-assistant/discussions/48. It is currently one of the most upvoted feature requests for Home Assistant.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
Distributed under the MIT license with no warranty. You are fully liable for configuring this integration correctly to keep your Home Assistant installation secure. Use at your own risk. The full license can be found in [LICENSE.md](./LICENSE.md)
|
Distributed under the MIT license with no warranty. You are fully liable for configuring this integration correctly to keep your Home Assistant installation secure. Use at your own risk. The full license can be found in [LICENSE.md](./LICENSE.md)
|
||||||
|
|
||||||
|
|||||||
@@ -24,10 +24,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rounded-lg border border-gray-300 bg-white p-6 text-left">
|
<div class="rounded-lg border border-gray-300 bg-white p-6 text-left">
|
||||||
<div class="mb-4 flex items-center justify-between text-gray-700">
|
<h2 class="mb-2 text-lg font-semibold text-gray-800">Use a code from another device</h2>
|
||||||
<span class="text-lg font-semibold">Use a code from another device</span>
|
|
||||||
</div>
|
|
||||||
<div class="border-t border-gray-200 pt-4">
|
|
||||||
<p class="mb-2 text-sm text-gray-600">On your other device, open the Home Assistant app. You will see a
|
<p class="mb-2 text-sm text-gray-600">On your other device, open the Home Assistant app. You will see a
|
||||||
6-digit code.</p>
|
6-digit code.</p>
|
||||||
<p class="mb-4 text-sm text-gray-600">Input that code here and click Approve to login on the other device.
|
<p class="mb-4 text-sm text-gray-600">Input that code here and click Approve to login on the other device.
|
||||||
@@ -61,6 +58,5 @@
|
|||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
# Configuration methods
|
# UI Configuration
|
||||||
|
|
||||||
Currently, the only available configuration method is YAML in your `configuration.yaml` file. In the future, we will also add limited UI configuration for the most common configurations (Authentik, Authelia and Pocket-ID). Advanced users will need to use the YAML configuration in any case.
|
If you want to use the (limited) UI configuration method, please see [the README](../README.md).
|
||||||
|
|
||||||
# YAML Configuration
|
# YAML Configuration
|
||||||
For now, this integration is configured using YAML in your `configuration.yaml` file. By default, only two fields are required:
|
|
||||||
|
You can configure this integration using YAML in your `configuration.yaml` file. All features of the integrations will always be available within the YAML configuration.
|
||||||
|
|
||||||
|
By default, only two fields are required:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
auth_oidc:
|
auth_oidc:
|
||||||
@@ -157,7 +160,6 @@ Here's a table of all options that you can set:
|
|||||||
| `features.automatic_person_creation` | `boolean` | No | `true` | Automatically creates a person entry for new user profiles created by this integration. Recommended if you would like to assign presence detection to OIDC users. |
|
| `features.automatic_person_creation` | `boolean` | No | `true` | Automatically creates a person entry for new user profiles created by this integration. Recommended if you would like to assign presence detection to OIDC users. |
|
||||||
| `features.disable_rfc7636` | `boolean`| No | `false` | Disables PKCE (RFC 7636) for OIDC providers that don't support it. You should not need this with most providers. |
|
| `features.disable_rfc7636` | `boolean`| No | `false` | Disables PKCE (RFC 7636) for OIDC providers that don't support it. You should not need this with most providers. |
|
||||||
| `features.include_groups_scope` | `boolean` | No | `true` | Include the 'groups' scope in the OIDC request. Set to `false` to exclude it. |
|
| `features.include_groups_scope` | `boolean` | No | `true` | Include the 'groups' scope in the OIDC request. Set to `false` to exclude it. |
|
||||||
| `features.disable_frontend_changes` | `boolean` | No | `false` | Set to `true` to disable all changes made to the HA frontend for better compatbility with future HA versions, or if you are not comfortable with injecting Javascript into the existing frontend code. |
|
|
||||||
| `features.force_https` | `boolean` | No | `false` | Set to `true` to force all URLs generated to use `https` instead of automatically determining based on the request scheme or `X-Forwarded-Proto`. |
|
| `features.force_https` | `boolean` | No | `false` | Set to `true` to force all URLs generated to use `https` instead of automatically determining based on the request scheme or `X-Forwarded-Proto`. |
|
||||||
| `claims.display_name` | `string` | No | `name` | The claim to use to obtain the display name.
|
| `claims.display_name` | `string` | No | `name` | The claim to use to obtain the display name.
|
||||||
| `claims.username` | `string` | No | `preferred_username` | The claim to use to obtain the username.
|
| `claims.username` | `string` | No | `preferred_username` | The claim to use to obtain the username.
|
||||||
|
|||||||
41
docs/faq.md
Normal file
41
docs/faq.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Frequently Asked Questions
|
||||||
|
|
||||||
|
## What are the values of this project? Why would I choose this integration over alternatives?
|
||||||
|
|
||||||
|
Provides a **stable and secure** OpenID Connect (OIDC) implementation for Home Assistant through a custom component/integration. With this integration, you can create a single-sign-on (SSO) environment in your self-hosted application stack / homelab.
|
||||||
|
|
||||||
|
The core values for this integration are:
|
||||||
|
|
||||||
|
1. **Security**: strict adherence to the [OpenID Connect specification](https://openid.net/specs/openid-connect-core-1_0.html), [RFC 6749 (OAuth2)](https://datatracker.ietf.org/doc/html/rfc6749), [RFC 7519 (JWT)](https://datatracker.ietf.org/doc/html/rfc7519), [RFC 7636 (PKCE)](https://datatracker.ietf.org/doc/html/rfc7636) and [RFC 9700 (OAuth2 Security Best Practices)](https://datatracker.ietf.org/doc/html/rfc9700) as well as a focus on security tests in the automated test suite.
|
||||||
|
2. **Stability**: minimal patching of the core Home Assistant code such that updates of HA are less likely to break the integration and leave you without a way to login.
|
||||||
|
3. **Accessibility**: the integration should work for everyone as much as possible with default settings, regardless of your preferred authentication method.
|
||||||
|
|
||||||
|
**TLDR**: *Login to Home Assistant with this integration should 'just work', every time, for everyone in your household ([even your dad](https://github.com/home-assistant/architecture/issues/832#issuecomment-1328052330)), securely.*
|
||||||
|
|
||||||
|
## Is the integration stable?
|
||||||
|
|
||||||
|
Yes, this integration has been tested in production environments for multiple years and has almost full automated test coverage to test both security and regressions. Security issues as well as dependency updates are actively monitored through automated pipelines and [a security policy is available here](./SECURITY.md).
|
||||||
|
|
||||||
|
## What does this integration not do (yet)?
|
||||||
|
|
||||||
|
The integration is currently very suitable for homelab use, but not for enterprise use, because these specs/todos have not been implemented yet:
|
||||||
|
|
||||||
|
- [OpenID Connect Session Management 1.0](https://openid.net/specs/openid-connect-session-1_0.html): users that are disabled at the IdP do not get logged out in Home Assistant until their refresh token expires/they logout manually
|
||||||
|
- [OpenID Connect Front-Channel Logout 1.0](https://openid.net/specs/openid-connect-frontchannel-1_0.html): logout in Home Assistant does not automatically log the user out at the IdP
|
||||||
|
- [OpenID Connect Back-Channel Logout 1.0 incorporating errata set 1](https://openid.net/specs/openid-connect-backchannel-1_0.html)
|
||||||
|
- *Open TODO*: Permissions are only set upon first login (https://github.com/christiaangoossens/hass-oidc-auth/discussions/187), as permission changes would necessitate revoking refresh tokens/implementing session management
|
||||||
|
- Other RFC's and best practices with regards to token expiration and revocation in the app itself
|
||||||
|
|
||||||
|
These features are hard to implement correctly within a custom integration, as they involve the full authentication lifecycle. Home Assistant does currently implement some features to see which refresh tokens were issued (and thus which sessions are open), which work well with this integration, but lacks any further security focussed features.
|
||||||
|
|
||||||
|
For home use where users rarely change permissions/status, these features aren't commonly required. However, if you would like to help implement any of these specifications (while sticking to the value of 'Stability' and minimal Home Assistant core code patching), feel free to create a PR.
|
||||||
|
|
||||||
|
## Why does this integration only allow for sign-in on mobile with a device code?
|
||||||
|
Several attempts have been made at implementing a direct mobile sign-in, but due to many issues (which can be found in https://github.com/orgs/home-assistant/discussions/48 and https://github.com/christiaangoossens/hass-oidc-auth/discussions/95), an approach was chosen that works for all setups and all authentication methods. The mobile apps now show a code, which can be entered into either the Chrome (Android)/Safari (iOS) apps on the mobile device or on another computer, after which the app automatically links and continues with the setup.
|
||||||
|
|
||||||
|
If you would like to make another attempt at implementing direct sign-in anyway, please submit a PR.
|
||||||
|
|
||||||
|
## I am using a proxy setup where my reverse proxy authenticates users
|
||||||
|
This integration is intended to be public-facing (as most OIDC apps). If you are authenticating users at the reverse proxy level (such as if you are migrating from https://github.com/BeryJu/hass-auth-header), **you should remove this authentication layer after installing this integration.**.
|
||||||
|
|
||||||
|
In general, make sure to set your Home Assistant configuration correctly for your reverse proxy as well (see https://www.home-assistant.io/integrations/http/#reverse-proxies). It is important that the original visitor IP is passed through to Home Assistant for optimal security.
|
||||||
@@ -1,84 +1,3 @@
|
|||||||
# How do I use the OIDC Integration for Home Assistant?
|
# Usage Guide
|
||||||
|
|
||||||
Here's a step by step guide to use the integration:
|
The usage instructions have moved to [the main README](../README.md)
|
||||||
|
|
||||||
### Step 1: HACS
|
|
||||||
Install the integration through [HACS](https://hacs.xyz/). You can add it automatically using the button below, or use the Github URL and type `Integration` in the manual Custom Repository add dialog.
|
|
||||||
|
|
||||||
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=christiaangoossens&repository=hass-oidc-auth&category=Integration)
|
|
||||||
|
|
||||||
|
|
||||||
### Step 2: Configuration of the integration
|
|
||||||
The integration is currently configurable through YAML only. See the [Configuration Guide](./configuration.md) for more details or pick your OIDC provider below (additional providers are available in the Configuration Guide):
|
|
||||||
|
|
||||||
| <img src="https://goauthentik.io/img/icon_top_brand_colour.svg" width="100"> | <img src="https://www.authelia.com/images/branding/logo-cropped.png" width="100"> | <img src="https://github.com/user-attachments/assets/4ceb2708-9f29-4694-b797-be833efce17d" width="100"> |
|
|
||||||
|:-----------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------:|
|
|
||||||
| [Authentik](./provider-configurations/authentik.md) | [Authelia](./provider-configurations/authelia.md) | [Pocket ID](./provider-configurations/pocket-id.md) |
|
|
||||||
|
|
||||||
By default, the integration assumes you configure Home Assistant as a **public client** and thus only specify the `client_id` and no `client_secret`. For example, your configuration might look like:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
auth_oidc:
|
|
||||||
client_id: "example"
|
|
||||||
discovery_url: "https://example.com/.well-known/openid-configuration"
|
|
||||||
```
|
|
||||||
|
|
||||||
When registering Home Assistant at your OIDC provider, use `<your HA URL>/auth/oidc/callback` as the callback URL and select 'public client'. You should now get the `client_id` and `issuer_url` or `discovery_url` to fill in.
|
|
||||||
|
|
||||||
### Step 3: Restart
|
|
||||||
Restart Home Assistant. You can do so by going to the Reparations/Update section in Home Assistant.
|
|
||||||
|
|
||||||
### Step 4: Go to the OIDC login screen
|
|
||||||
After restarting Home Assistant, you should now be able to get to the login screen. You can find it at `<your HA URL>/auth/oidc/welcome`. You will have to go there manually for now. For example, it might be located at http://homeassistant.local:8123/auth/oidc/welcome.
|
|
||||||
|
|
||||||
It should look like this:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
If you have configured everything correctly, you should be redirected to your OIDC Provider after clicking the button. Please login there.
|
|
||||||
|
|
||||||
You should return to a screen like this:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Either click the automatic sign in button or copy the code.
|
|
||||||
This screen will give you a one-time code to login that expires in 5 minutes.
|
|
||||||
|
|
||||||
#### Step 4a: Automatic login
|
|
||||||
If you would like to login automatically, click the button. It will log you in to your user in the current browser window.
|
|
||||||
|
|
||||||
#### Step 4b: Code login
|
|
||||||
If you would like to login using the code, go to your normal Home Assistant URL without any user logged in, such as on your mobile device/wall tablet/smart watch. You will now see the following screen:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
If you don't, you likely see:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
If so, click "OpenID Connect (SSO)" to get to the first screen. If you have configured a [display name](./configuration.md#configuring-a-display-name-for-your-oidc-provider), that will show instead.
|
|
||||||
|
|
||||||
Enter your code into the single input field:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Upon clicking login, you should now login.
|
|
||||||
If the code is wrong, you will see this instead:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
#### Step 5: Logged in
|
|
||||||
You will be logged in after following this guide.
|
|
||||||
|
|
||||||
With the default configuration, [a person entry](https://www.home-assistant.io/integrations/person/) will be created for every new OIDC user logging in. New OIDC users will get their own fresh user, linked to their persistent ID (subject) at the OpenID Connect provider. You may change your name, username or email at the provider and still have the same Home Assistant user profile.
|
|
||||||
|
|
||||||
# How can I make this easier for my users?
|
|
||||||
|
|
||||||
You can link the user directly to one of these following URLs:
|
|
||||||
|
|
||||||
- `/auth/oidc/welcome` (if you would like a nice welcome screen for your users)
|
|
||||||
- `/auth/oidc/redirect` (if you would like to just redirect them without a welcome screen)
|
|
||||||
|
|
||||||
For a seamless user experience, configure a new domain on your proxy to redirect to the `/auth/oidc/welcome` path or configure that path on your homelab dashboard or in your OIDC provider (such as in the app settings in Authentik). Users will then always start on the OIDC welcome page, which will allow them to visit the dashboard if they are already logged in.
|
|
||||||
|
|
||||||
*Note: do not replace the standard path with a redirect to the OIDC screen. This breaks login with code.*
|
|
||||||
Reference in New Issue
Block a user