diff --git a/src/CreateCrossSigning.ts b/src/CreateCrossSigning.ts index db85aec02a..8978ab79e4 100644 --- a/src/CreateCrossSigning.ts +++ b/src/CreateCrossSigning.ts @@ -15,6 +15,11 @@ import Modal from "./Modal"; import { _t } from "./languageHandler"; import InteractiveAuthDialog from "./components/views/dialogs/InteractiveAuthDialog"; +/** + * Determine if the homeserver allows uploading device keys with only password auth. + * @param cli The Matrix Client to use + * @returns True if the homeserver allows uploading device keys with only password auth, otherwise false + */ async function canUploadKeysWithPasswordOnly(cli: MatrixClient): Promise { try { await cli.uploadDeviceSigningKeys(undefined, {} as CrossSigningKeys); @@ -35,6 +40,21 @@ async function canUploadKeysWithPasswordOnly(cli: MatrixClient): Promise