abort the login when the form returns null. This happens if the user
presses 'X' in the tfa form.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
if (client.credentials.tfa != null &&
client.credentials.tfa!.kinds().length > 0) {
- client = await Navigator.of(context).push(MaterialPageRoute(
+ ProxmoxApiClient? tfaclient =
+ await Navigator.of(context).push(MaterialPageRoute(
builder: (context) => ProxmoxTfaForm(
apiClient: client,
),
));
+
+ if (tfaclient != null) {
+ client = tfaclient;
+ } else {
+ setState(() {
+ _progressModel.inProgress -= 1;
+ });
+ return;
+ }
}
final status = await client.getClusterStatus();