fix: Support for email registration

This commit is contained in:
Christian Pauly 2021-04-09 17:04:08 +02:00
parent dc33e526f3
commit 0ff66f6f58

View file

@ -50,9 +50,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
await waitForLogin;
} on MatrixException catch (exception) {
if (exception.requireAdditionalAuthentication) {
final stages = exception.authenticationFlows
.firstWhere((a) => !a.stages.contains('m.login.email.identity'))
.stages;
final stages = exception.authenticationFlows.first.stages;
final currentStage = exception.completedAuthenticationFlows == null
? stages.first