diff --git a/modules/widget-lifecycle/element-web/README.md b/modules/widget-lifecycle/element-web/README.md index 7cc0bc734c..cfe2569e4e 100644 --- a/modules/widget-lifecycle/element-web/README.md +++ b/modules/widget-lifecycle/element-web/README.md @@ -61,14 +61,3 @@ This is useful when widgets have multiple routes or capabilities include variabl } } ``` - -## Copyright & License - -Copyright (c) 2025 New Vector Ltd - -This software is multi licensed by New Vector Ltd (Element). It can be used either: - -(1) for free under the terms of the GNU Affero General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR - -(2) under the terms of a paid-for Element Commercial License agreement between you and Element (the terms of which may vary depending on what you and Element have agreed to). -Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses. diff --git a/modules/widget-lifecycle/element-web/e2e/fixture/widget.html b/modules/widget-lifecycle/element-web/e2e/fixture/widget.html index 1667a73c44..4c293c5c6d 100644 --- a/modules/widget-lifecycle/element-web/e2e/fixture/widget.html +++ b/modules/widget-lifecycle/element-web/e2e/fixture/widget.html @@ -1,4 +1,13 @@ - +
@@ -19,6 +28,7 @@ let sendEventCount = 0; window.onmessage = async (ev) => { if (ev.data.action === "capabilities") { + // Step 1: Element is asking what capabilities this widget needs. window.parent.postMessage( Object.assign( { @@ -31,6 +41,8 @@ "*", ); } else if (ev.data.action === "notify_capabilities") { + // Step 2: Capabilities have been approved. Request an OpenID token + // so we can identify the current user in step 3. window.parent.postMessage( { api: "fromWidget", @@ -42,6 +54,8 @@ "*", ); } else if (ev.data.action === "get_openid" && ev.data.response?.state === "allowed") { + // Step 3: Token granted — exchange it for the user's Matrix ID and display it. + // Tests assert on this heading to verify identity was passed through correctly. const { access_token } = ev.data.response; const hsUrl = new URLSearchParams(window.location.search).get("hsUrl"); diff --git a/modules/widget-lifecycle/element-web/src/WidgetLifecycleModule.ts b/modules/widget-lifecycle/element-web/src/WidgetLifecycleModule.ts index 144a799291..ec2ca1034b 100644 --- a/modules/widget-lifecycle/element-web/src/WidgetLifecycleModule.ts +++ b/modules/widget-lifecycle/element-web/src/WidgetLifecycleModule.ts @@ -30,7 +30,7 @@ export default class WidgetLifecycleModule implements Module { public constructor(private api: ModuleApi) {} public async load(): Promise