mirror of https://github.com/vector-im/riot-web
Delay IS access tokens
parent
e98b753c21
commit
0ab9efc594
|
@ -200,7 +200,6 @@ export default class AddThreepid {
|
||||||
*/
|
*/
|
||||||
async haveMsisdnToken(msisdnToken) {
|
async haveMsisdnToken(msisdnToken) {
|
||||||
const authClient = new IdentityAuthClient();
|
const authClient = new IdentityAuthClient();
|
||||||
const identityAccessToken = await authClient.getAccessToken();
|
|
||||||
|
|
||||||
let result;
|
let result;
|
||||||
if (this.submitUrl) {
|
if (this.submitUrl) {
|
||||||
|
@ -215,7 +214,7 @@ export default class AddThreepid {
|
||||||
this.sessionId,
|
this.sessionId,
|
||||||
this.clientSecret,
|
this.clientSecret,
|
||||||
msisdnToken,
|
msisdnToken,
|
||||||
identityAccessToken,
|
await authClient.getAccessToken(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (result.errcode) {
|
if (result.errcode) {
|
||||||
|
@ -225,13 +224,11 @@ export default class AddThreepid {
|
||||||
const identityServerDomain = MatrixClientPeg.get().idBaseUrl.split("://")[1];
|
const identityServerDomain = MatrixClientPeg.get().idBaseUrl.split("://")[1];
|
||||||
if (await MatrixClientPeg.get().doesServerSupportSeparateAddAndBind()) {
|
if (await MatrixClientPeg.get().doesServerSupportSeparateAddAndBind()) {
|
||||||
if (this.bind) {
|
if (this.bind) {
|
||||||
const authClient = new IdentityAuthClient();
|
|
||||||
const identityAccessToken = await authClient.getAccessToken();
|
|
||||||
await MatrixClientPeg.get().bindThreePid({
|
await MatrixClientPeg.get().bindThreePid({
|
||||||
sid: this.sessionId,
|
sid: this.sessionId,
|
||||||
client_secret: this.clientSecret,
|
client_secret: this.clientSecret,
|
||||||
id_server: identityServerDomain,
|
id_server: identityServerDomain,
|
||||||
id_access_token: identityAccessToken,
|
id_access_token: await authClient.getAccessToken(),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await MatrixClientPeg.get().addThreePidOnly({
|
await MatrixClientPeg.get().addThreePidOnly({
|
||||||
|
|
Loading…
Reference in New Issue