You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Add IS access token callback
This passes a callback to the JS SDK which it can use to get IS access tokens whenever needed for either talking to the IS directly or passing along to the HS. Fixes https://github.com/vector-im/riot-web/issues/10525
This commit is contained in:
@@ -32,6 +32,7 @@ import Modal from './Modal';
|
||||
import {verificationMethods} from 'matrix-js-sdk/lib/crypto';
|
||||
import MatrixClientBackedSettingsHandler from "./settings/handlers/MatrixClientBackedSettingsHandler";
|
||||
import * as StorageManager from './utils/StorageManager';
|
||||
import IdentityAuthClient from './IdentityAuthClient';
|
||||
|
||||
interface MatrixClientCreds {
|
||||
homeserverUrl: string,
|
||||
@@ -219,6 +220,9 @@ class MatrixClientPeg {
|
||||
fallbackICEServerAllowed: !!SettingsStore.getValue('fallbackICEServerAllowed'),
|
||||
verificationMethods: [verificationMethods.SAS],
|
||||
unstableClientRelationAggregation: true,
|
||||
getIdentityAccessToken: () => {
|
||||
return new IdentityAuthClient().getAccessToken();
|
||||
},
|
||||
};
|
||||
|
||||
this.matrixClient = createMatrixClient(opts);
|
||||
|
||||
Reference in New Issue
Block a user