Enable token request for HostingSignupDialog

Needed for the last part of setup which is triggering
a migration process to the new host.
This commit is contained in:
Jason Robinson 2020-11-13 15:36:56 +02:00
parent a37e0db3e1
commit 1e699b7ef3

View file

@ -49,6 +49,9 @@ export default class HostingSignupDialog extends React.PureComponent<IProps, ISt
}
switch (message.data.action) {
case 'access_token_credential_request':
this.sendAccessToken();
break;
case 'openid_credentials_request':
// noinspection JSIgnoredPromiseFromCall
this.fetchOpenIDToken();
@ -100,6 +103,13 @@ export default class HostingSignupDialog extends React.PureComponent<IProps, ISt
}
}
private sendAccessToken() {
this.sendMessage({
action: 'access_token_credential',
token: MatrixClientPeg.get().getAccessToken(),
});
}
public componentDidMount() {
window.addEventListener("message", this.messageHandler);
}