2FA getting error generating totp uri

I have 2fa enable, and when i trying to sign in, i'm getting error generating totp uri. I'm getting 401 Unauthorized. I double checked the password. I'm using sveltekit.

here the snippet i used directly for docs

const { data, error } = await authClient.twoFactor.getTotpUri({ password: "password" // user password required })


Can someone please explain or help why im getting this error
Was this page helpful?