BA
Better Auth•11mo ago
fynn

2FA plugin accepts every password

I just tried to set up the Two Factor Plugin and I saw, that I can enter every password at twoFactor.enable. Every password gets accepted, which probably should not be the way to go.
22 Replies
bekacru
bekacru•11mo ago
oh this shouldn't happen could you try 1.0.8-beta.2 if it fixes the issue.
fynn
fynnOP•11mo ago
that worked, thanks! but I am wondering: the verification code after scanning the qr code gives me the error "invalid two factor authentication" although the google authenticator gives me this code
bekacru
bekacru•11mo ago
does it constantly return you that?
fynn
fynnOP•11mo ago
if you mean after waiting for a new code and then try the new one, yes
bekacru
bekacru•11mo ago
so it's not working with any code you get from the authenticator app?
fynn
fynnOP•11mo ago
yes, exactly
bekacru
bekacru•11mo ago
there might be a misconfiguration. Check again and try scanning the URL. If you disable and enable it, a new secret will be generated. If you're trying to use the old value, it won't work. So check that.
fynn
fynnOP•11mo ago
also after disabling, I'll get the error. I see, that I also get this one in the console: could that be the problem?
01 in 280ms
POST /api/auth/two-factor/verify-totp?currentURL=http%3A%2F%2Flocalhost%3A3000%2Fen%2Fdashboard%2Fsettings%2Fsecurity 401 in 588ms
01 in 280ms
POST /api/auth/two-factor/verify-totp?currentURL=http%3A%2F%2Flocalhost%3A3000%2Fen%2Fdashboard%2Fsettings%2Fsecurity 401 in 588ms
dont exactly know, why this one getting called, If I am in the settings, not on the auth two factor verification page?
bekacru
bekacru•11mo ago
this should only be called on two fa page or when trying to enable maybe create new user and try to enable it to see the problem
fynn
fynnOP•11mo ago
that sadly did not change anything. to the message above: yes, I mean on enabling, sorry. @bekacru any other idea about this one?
bekacru
bekacru•11mo ago
Hey wasn't working today 🙂 will get back to you later
fynn
fynnOP•11mo ago
no problem, thanks! hey, any updates? @bekacru
bekacru
bekacru•11mo ago
Hey could you check if it still happens on latest?
fynn
fynnOP•11mo ago
hey, sorry for the late response, I was sick over the week. I just tried it, and it worked on latest - thanks! But in the Google Authenticator App, my App is displayed as "Better Auth" how can I change that? In my auth.ts I already set appName
bekacru
bekacru•11mo ago
Oh sorry man. hope you're doing better. And you can set issuer in the plugin config
fynn
fynnOP•11mo ago
thanks. so the docs are wrong? It says appName: "My App", // provide your app name. It'll be used as an issuer.
bekacru
bekacru•11mo ago
It should have worked actually. I'll check why it didn't.
fynn
fynnOP•10mo ago
with issuer in the config, it worked. just wondered if the docs are wrong then, as it says appName will define the issuer
Ping
Ping•10mo ago
im abt to sleep, but can you lmk if the docs already elaborates on this? If not i can add documentation which states that the authenticator app will display by the issuer
No description
fynn
fynnOP•10mo ago
you can check it yourself but no, it isn't.
Ping
Ping•10mo ago
It isn't? interesting... Alright I'll add it to docs when i wake.

Did you find this page helpful?