diff --git a/src/IdentityAuthClient.js b/src/IdentityAuthClient.js index f21db12c51..c82c93e7a6 100644 --- a/src/IdentityAuthClient.js +++ b/src/IdentityAuthClient.js @@ -183,8 +183,10 @@ export default class IdentityAuthClient { async registerForToken(check=true) { try { const hsOpenIdToken = await MatrixClientPeg.get().getOpenIdToken(); - const { access_token: identityAccessToken } = + // XXX: The spec is `token`, but we used `access_token` for a Sydent release. + const { access_token: accessToken, token } = await this._matrixClient.registerWithIdentityServer(hsOpenIdToken); + const identityAccessToken = token ? token : accessToken; if (check) await this._checkToken(identityAccessToken); return identityAccessToken; } catch (e) {