This commit is contained in:
Christian Pauly 2020-01-14 12:16:29 +01:00
parent 4549f92914
commit 087efa67ff

View file

@ -80,17 +80,22 @@ class _SignUpPasswordState extends State<SignUpPassword> {
await Navigator.of(context).pushAndRemoveUntil( await Navigator.of(context).pushAndRemoveUntil(
AppRoute.defaultRoute(context, ChatListView()), (r) => false); AppRoute.defaultRoute(context, ChatListView()), (r) => false);
} else if (response.containsKey("flows")) { } else if (response.containsKey("flows")) {
final List<String> stages = response["flows"]["stages"]; final List stages = response["flows"][0]["stages"];
for (int i = 0; i < stages.length;) { for (int i = 0; i < stages.length; i++) {
print("Check stage $i: ${stages[i]}");
if (stages[i] == "m.login.dummy") { if (stages[i] == "m.login.dummy") {
print("[Sign Up] Process m.login.dummy stage"); print("[Sign Up] Process m.login.dummy stage");
_signUpAction(context, auth: { _signUpAction(context, auth: {
"type": stages[i], "type": stages[i],
"session": response["session"], "session": response["session"],
}); });
break; return;
} }
} }
setState(() => passwordError =
"The server requires unsupported authentication flows");
setState(() => loading = false);
return;
} }
setState(() => loading = false); setState(() => loading = false);