Relax identity server discovery error handling
If discovery results in a warning for the identity server (as in can't be found or is malformed), this allows you to continue signing in and shows the warning above the form. Fixes https://github.com/vector-im/riot-web/issues/11102
This commit is contained in:
parent
54cea6a5e3
commit
446e21c2e1
2 changed files with 32 additions and 14 deletions
|
@ -378,8 +378,19 @@ module.exports = createReactClass({
|
|||
|
||||
// Do a quick liveliness check on the URLs
|
||||
try {
|
||||
await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl);
|
||||
this.setState({serverIsAlive: true, errorText: ""});
|
||||
const { warning } =
|
||||
await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl);
|
||||
if (warning) {
|
||||
this.setState({
|
||||
...AutoDiscoveryUtils.authComponentStateForError(warning),
|
||||
errorText: "",
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
serverIsAlive: true,
|
||||
errorText: "",
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
this.setState({
|
||||
busy: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue