Add client_uri, tos_uri and policy_uri client metadata

This commit is contained in:
Quentin Gliech 2022-04-29 16:30:24 +02:00
parent f1cc22a920
commit 897fc54103
No known key found for this signature in database
GPG Key ID: 22D62B84552719FC
2 changed files with 7 additions and 0 deletions

View File

@ -129,6 +129,10 @@ export class URLRouter {
return window.location.origin; return window.location.origin;
} }
absoluteAppUrl() {
return window.location.origin;
}
absoluteUrlForAsset(asset) { absoluteUrlForAsset(asset) {
return (new URL('/assets/' + asset, window.location.origin)).toString(); return (new URL('/assets/' + asset, window.location.origin)).toString();
} }

View File

@ -78,6 +78,9 @@ export class OidcApi {
return { return {
client_name: "Hydrogen Web", client_name: "Hydrogen Web",
logo_uri: this._urlCreator.absoluteUrlForAsset("icon.png"), 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"], response_types: ["code"],
grant_types: ["authorization_code", "refresh_token"], grant_types: ["authorization_code", "refresh_token"],
redirect_uris: [this._urlCreator.createOIDCRedirectURL()], redirect_uris: [this._urlCreator.createOIDCRedirectURL()],