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
- Cant use dotnet-8.0 and Deno 2.0 Runtime...
Hi, i cant get up and running any .net and deno 2.0 runtimes. Steps i tried: 1. Added in .env: _APP_FUNCTIONS_RUNTIMES=deno-2.0,php-8.3,python-3.9,dotnet-8.0 2....
- can’t log in after launching to the inte...
I built a database for a client, and though i’m a novice, the process wasn’t so bad. It worked great with localhost. When i put it on the web, i changed the A...
- _APP_FUNCTIONS_MEMORY value not working ...
Unfortunately I can not increase the memory limit for java runtimes in 1.6.0. It is always limited to ca. 500 MB. Is there a workaround to fix this? Thanks!