Otherwise the tfa form will error out trying to access an index in the
array that does not exist (it assumes there is at least one type).
This can happen e.g. if there is only webauthn for a user configured
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
var client = await proxclient.authenticate(
'$username@$realm', password, origin, settings.sslValidation!);
- if (client.credentials.tfa != null) {
+ if (client.credentials.tfa != null &&
+ client.credentials.tfa!.kinds().length > 0) {
client = await Navigator.of(context).push(MaterialPageRoute(
builder: (context) => ProxmoxTfaForm(
apiClient: client,