Send the correct UIA alongside the wrong UIA for backwards comaptibility

Fixes https://github.com/vector-im/riot-web/issues/10312
This commit is contained in:
Travis Ralston 2019-07-11 14:28:10 -06:00
parent 0950037ca3
commit 862fb16120
2 changed files with 19 additions and 0 deletions

View file

@ -91,7 +91,13 @@ export const PasswordAuthEntry = React.createClass({
this.props.submitAuthDict({
type: PasswordAuthEntry.LOGIN_TYPE,
// TODO: Remove `user` once servers support proper UIA
// See https://github.com/vector-im/riot-web/issues/10312
user: this.props.matrixClient.credentials.userId,
identifier: {
type: "m.id.user",
user: this.props.matrixClient.getUserId(),
},
password: this.state.password,
});
},
@ -463,11 +469,18 @@ export const MsisdnAuthEntry = React.createClass({
);
this.props.submitAuthDict({
type: MsisdnAuthEntry.LOGIN_TYPE,
// TODO: Remove `threepid_creds` once servers support proper UIA
// See https://github.com/vector-im/riot-web/issues/10312
threepid_creds: {
sid: this._sid,
client_secret: this.props.clientSecret,
id_server: idServerParsedUrl.host,
},
threepidCreds: {
sid: this._sid,
client_secret: this.props.clientSecret,
id_server: idServerParsedUrl.host,
},
});
} else {
this.setState({