You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/frontend/external-authentication.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ If you want to embed the Home Assistant frontend in an external app, you will wa
9
9
To activate this API, load the frontend with `?external_auth=1` appended to the URL. If this is passed in, Home Assistant will expect either `window.externalAppV2` (Android V2, recommended), `window.externalApp` (Android V1, fallback) or `window.webkit.messageHandlers` (iOS) to be defined containing the methods described below.
10
10
11
11
:::note
12
-
V2 (`window.externalAppV2`) is only available when the WebView supports[`WebViewFeature.WEB_MESSAGE_LISTENER`][web-message-listener]. The app should fall back to V1 otherwise.
12
+
V2 (`window.externalAppV2`) requires the WebView to support[`WebViewFeature.WEB_MESSAGE_LISTENER`][web-message-listener]. The app should fall back to V1 otherwise.
13
13
:::
14
14
15
15
## Get access token
@@ -19,15 +19,15 @@ When the frontend loads, it will request an access token from the external authe
19
19
The `force` boolean has been introduced in Home Assistant 0.104 and might not always be available.
@@ -59,15 +59,15 @@ The frontend will call this method when the page first loads and whenever it nee
59
59
When the user presses the logout button on the profile page, the external app will have to [revoke the refresh token](auth_api.md#revoking-a-refresh-token), and log the user out.
Copy file name to clipboardExpand all lines: docs/frontend/external-bus.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,8 @@ Messages are passed to the external app as serialized JSON objects. The function
12
12
13
13
On Android, the implementation depends on the WebView features:
14
14
15
-
**V2 (recommended)**: Uses [`WebViewFeature.WEB_MESSAGE_LISTENER`][web-message-listener] for secure origin validation. The frontend sends messages using:
15
+
**V2 (recommended)**: Uses [`WebViewFeature.WEB_MESSAGE_LISTENER`][web-message-listener] for secure origin validation. The frontend sends messages using the injected V2 object:
0 commit comments