mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 22:28:49 +03:00
Merge pull request #364 from d42/d42/find-sso-flow
Try to find SSO flow in all of the server flows
This commit is contained in:
commit
aab7447d02
1 changed files with 8 additions and 4 deletions
|
@ -315,10 +315,14 @@ LoginPage::checkHomeserverVersion()
|
||||||
if (err || flows.flows.empty())
|
if (err || flows.flows.empty())
|
||||||
emit versionOkCb(LoginMethod::Password);
|
emit versionOkCb(LoginMethod::Password);
|
||||||
|
|
||||||
if (flows.flows[0].type == mtx::user_interactive::auth_types::sso)
|
LoginMethod loginMethod = LoginMethod::Password;
|
||||||
emit versionOkCb(LoginMethod::SSO);
|
for(const auto &flow : flows.flows) {
|
||||||
else
|
if (flow.type == mtx::user_interactive::auth_types::sso) {
|
||||||
emit versionOkCb(LoginMethod::Password);
|
loginMethod = LoginMethod::SSO;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
emit versionOk(loginMethod);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue