diff --git a/src/domain/navigation/URLRouter.ts b/src/domain/navigation/URLRouter.ts index ff9dcd76..dbd1ceee 100644 --- a/src/domain/navigation/URLRouter.ts +++ b/src/domain/navigation/URLRouter.ts @@ -156,6 +156,10 @@ export class URLRouter implements IURLRou return window.location.origin; } + absoluteAppUrl(): string { + return window.location.origin; + } + absoluteUrlForAsset(asset: string): string { return (new URL('/assets/' + asset, window.location.origin)).toString(); } diff --git a/src/matrix/net/OidcApi.ts b/src/matrix/net/OidcApi.ts index 319d122f..57168622 100644 --- a/src/matrix/net/OidcApi.ts +++ b/src/matrix/net/OidcApi.ts @@ -78,6 +78,9 @@ export class OidcApi { return { client_name: "Hydrogen Web", logo_uri: this._urlCreator.absoluteUrlForAsset("icon.png"), + client_uri: this._urlCreator.absoluteAppUrl(), + tos_uri: "https://element.io/terms-of-service", + policy_uri: "https://element.io/privacy", response_types: ["code"], grant_types: ["authorization_code", "refresh_token"], redirect_uris: [this._urlCreator.createOIDCRedirectURL()],