2FA Error
so im following the docs, i called twoFactor enable, it successfully generated totpURI and backcodes, Im also able to scan the code using google authenticator. but then im trying to verify the code. i get invalid two factor cookie. I'm also getting 401 unauthorized. What the problem or if im doing something wrong
4 Replies
i got same issue, when i put wrong code it return invalid two factor cookie but if the 6char code is correct it return success

and this if i put wrong code

Did your code generate better-auth.twofactor cookie on enable?
Can I show your code please
Bruh
This error only happen when you override the default period time for totp
Finally solved it by sticking with default period and removing totpOption override