
Hello everyone!
I'm trying to implement TFA in my angular app, but it seems that i'm doing something wrong somewhere. Can anyone help me verify why my code ain't working? So far i have followed this flow: createMfaAuthenticator -> updateMfaAuthenticator (but the otp code is always incorrect according to appwrite) -> createMfaRecoveryCodes -> updateMFA. Here's my code:
generateSecret() {
return from(this.account.createMfaAuthenticator());
}
generateRecoveryCodes(otp: string) {
return from(this.account.updateMfaAuthenticator(otp)).pipe(
switchMap(() => {
return from(this.account.createMfaRecoveryCodes());
})
);
}
enable() {
return from(this.account.updateMFA(true));
}
Also im pretty sure there's no calling otp twice, the secret is being generated only once. That can be seen in the network tab, only one PUT otp call , the other one is an OPTIONS call. So, anybody have any ideia?

Recommended threads
- Error while usining domain
While usining domain and im im messaging tab i see: 500 Internal Error But when i use IP:PORT i see this: (Photo) Where is problem The console looks like t...
- Realtime Memory Usage
Appwrite-Realtime container has been acting strangely lately. None of my functions use this feature, but it has been consuming a large chunk of memory. When I s...
- No mails from Appwrite
Hello, Since severals days, i have a problem : i d'ont received any mails from Appwrite. I'm using the auth by mail and i don't any code so any mails from App...
