mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
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:
parent
a37e0db3e1
commit
1e699b7ef3
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue