I'm getting an error trying to delete totp using the code
TypeScript
await _account.deleteMfaAuthenticator(
otp: otp,
type: AuthenticatorType.totp,
);
the error says
TypeScript
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'String' is not a subtype of type 'Map<String, dynamic>'
#0 Account.deleteMfaAuthenticator (package:appwrite/services/account.dart:256:36)
<asynchronous suspension>
#1 MultiFactorAuthenticationDataSource.disableAuthenticatorApp (package:otoscopia/src/features/settings/data/datasources/multi_factor_authentication_data_source.dart:41:7)
<asynchronous suspension>
#2 _MfaWidgetState.build.<anonymous closure> (package:otoscopia/src/features/settings/presentation/widgets/profile/disable_mfa_widget.dart:41:19)
<asynchronous suspension>```
TL;DR
Error occurs when trying to delete TOTP 2FA using provided code. Error message says 'type 'String' is not a subtype of type 'Map<String, dynamic>'. Solution: update the code to pass a Map<String, dynamic> instead of just a String for 'otp'.adding totp doesnt get an error
but deleting causes an error but it gets the job done
Recommended threads
- JavaScript heap out of memory during bui...
I am running into heap out of memory when I am trying to build an Appwrite site. Usually this can be fixed by modifying the `max-old-space-size` configuration, ...
- client.ping() does not appear to work.
After upgrading to 1.8.0, I ran the `starter_for_flutter` and tested the ping. It failed with a "Server Error". I tried this again on my production instance (1...
- Is there any reason you cant use a manag...
So quick context I would like to host a selfhosted Appwrite instance and I personally prefer to use managed DBs when able and really like to keep my DBs on dedi...