Skip to content

Commit

Permalink
Add client_uri, tos_uri and policy_uri client metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose committed Apr 29, 2022
1 parent 2ad96c7 commit 7b0e045
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/domain/navigation/URLRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export class URLRouter {
return window.location.origin;
}

absoluteAppUrl() {
return window.location.origin;
}

absoluteUrlForAsset(asset) {
return (new URL('/assets/' + asset, window.location.origin)).toString();
}
Expand Down
3 changes: 3 additions & 0 deletions src/matrix/net/OidcApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand Down

0 comments on commit 7b0e045

Please sign in to comment.