mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 03:05:51 +03:00
Merge pull request #27019 from element-hq/t3chguy/oidc-metadata
Improve client metadata used for OIDC dynamic registration
This commit is contained in:
commit
588094339a
1 changed files with 16 additions and 0 deletions
|
@ -43,6 +43,7 @@ import { BreadcrumbsStore } from "matrix-react-sdk/src/stores/BreadcrumbsStore";
|
|||
import { UPDATE_EVENT } from "matrix-react-sdk/src/stores/AsyncStore";
|
||||
import { avatarUrlForRoom, getInitialLetter } from "matrix-react-sdk/src/Avatar";
|
||||
import DesktopCapturerSourcePicker from "matrix-react-sdk/src/components/views/elements/DesktopCapturerSourcePicker";
|
||||
import { OidcRegistrationClientMetadata } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import VectorBasePlatform from "./VectorBasePlatform";
|
||||
import { SeshatIndexManager } from "./SeshatIndexManager";
|
||||
|
@ -435,4 +436,19 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
await this.ipc.call("clearStorage");
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
public get baseUrl(): string {
|
||||
// This configuration is element-desktop specific so the types here do not know about it
|
||||
return (SdkConfig.get() as unknown as Record<string, string>)["web_base_url"] ?? "https://app.element.io";
|
||||
}
|
||||
|
||||
public async getOidcClientMetadata(): Promise<OidcRegistrationClientMetadata> {
|
||||
const baseMetadata = await super.getOidcClientMetadata();
|
||||
return {
|
||||
...baseMetadata,
|
||||
applicationType: "native",
|
||||
// XXX: This should be overridable in config
|
||||
clientUri: "https://element.io",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue