Merge pull request #364 from d42/d42/find-sso-flow

Try to find SSO flow in all of the server flows
pull/365/head
DeepBlueV7.X 4 years ago committed by GitHub
commit aab7447d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      src/LoginPage.cpp

@ -315,10 +315,14 @@ LoginPage::checkHomeserverVersion()
if (err || flows.flows.empty())
emit versionOkCb(LoginMethod::Password);
if (flows.flows[0].type == mtx::user_interactive::auth_types::sso)
emit versionOkCb(LoginMethod::SSO);
else
emit versionOkCb(LoginMethod::Password);
LoginMethod loginMethod = LoginMethod::Password;
for(const auto &flow : flows.flows) {
if (flow.type == mtx::user_interactive::auth_types::sso) {
loginMethod = LoginMethod::SSO;
break;
}
}
emit versionOk(loginMethod);
});
});
}

Loading…
Cancel
Save