mirror of https://github.com/vector-im/riot-web
Keep sign in button disabled on success
This changes password login to keep the sign in button locked when proceeding successfully to avoid the possibility of double device sign in. Part of https://github.com/vector-im/riot-web/issues/12546pull/21833/head
parent
7b477d04bf
commit
88f351d5ca
|
@ -245,6 +245,7 @@ export default createReactClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
|
busy: false,
|
||||||
errorText: errorText,
|
errorText: errorText,
|
||||||
// 401 would be the sensible status code for 'incorrect password'
|
// 401 would be the sensible status code for 'incorrect password'
|
||||||
// but the login API gives a 403 https://matrix.org/jira/browse/SYN-744
|
// but the login API gives a 403 https://matrix.org/jira/browse/SYN-744
|
||||||
|
@ -252,13 +253,6 @@ export default createReactClass({
|
||||||
// We treat both as an incorrect password
|
// We treat both as an incorrect password
|
||||||
loginIncorrect: error.httpStatus === 401 || error.httpStatus === 403,
|
loginIncorrect: error.httpStatus === 401 || error.httpStatus === 403,
|
||||||
});
|
});
|
||||||
}).finally(() => {
|
|
||||||
if (this._unmounted) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.setState({
|
|
||||||
busy: false,
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue