-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using 2FA authenticator app also consumes backup 2FA passcodes #7907
Comments
Hey @jbusuttil, I have just tried to give this a go using my self hosted install and it appears to be ok, Do you only see this when running from source and which commands are you using to launch n8n? |
Correction (my bad): I had installed using n8n is launched from systemd:
|
Just to update on this, I disabled and re-enabled 2FA to regenerate the recovery codes, then I continued to log in using the authenticator app (again not using the recovery codes). After 10 logins, the same notification pops up to tell me that all the recovery codes have been used. I've disabled 2FA for the time being. |
Hey @jbusuttil, Some good news on this one, This issue was fixed in the |
Hi @Joffcom - I've just upgraded to |
@Joffcom Alas - still seeing the same problem in Logs:
|
Hey @jbusuttil That isn't good I will get the internal ticket opened again. While it does use up the recovery codes you should still be able to use MFA, the downside though is if you do need to use a recovery code you will need to use the cli to disable MFA for your user. |
Hey @jbusuttil, I have just been trying to reproduce this again on a clean |
HNY @Joffcom EDIT version (because typo): I've tested with 1.21.1, but not on a clean install. Test 1: After enabling MFA, the notification pops up that all recovery codes have been exhausted, as before. Test 2: I stayed logged in with my original browser (firefox), then I logged in from a different browser (chrome) while MFA was still enabled. I was able to log in and out in chrome repeatedly using MFA + auth app, despite further warning messages that my recovery codes were exhausted. Test 3: In chrome, which had popped up the warning notification that I had no recovery codes left, I was able to log in using one of the recovery codes. So a possible explanation is that only the warning notification itself is spurious. Thanks again for your help looking into this! Logs:
|
Hey @jbusuttil, Your log seems to be from For some reason no matter what I do I am not able to reproduce this, How many attempts are you doing before it showed the message? I got up to 30 this time before I was happy it was all good. Do you see the message on every authentication attempt, Is your user the owner or a normal user? When you enabled MFA did it pop up instantly to say the codes had been used or did it generate new codes for your user? |
@Joffcom Sorry - typo in the version number, should have been 1.21.1 (current 'latest' using (referring to my earlier comment ) Test 1: I logged in 4 times using MFA+app in firefox to get the first notification on the fourth login Test 2: I logged in 2 further times in chrome using MFA+app to get the notification there on the second login Test 3: no notification when using an actual recovery code to log in Logging in repeatedly thereafter with both firefox and chrome using MFA+app only generates the notification intermittently, not every login. No pattern I could discern, every 3-4 logins it seemed. I didn't receive a notification about recovery codes when I enabled MFA itself other than to download the recovery codes as usual. My user is the owner. |
@jbusuttil if I set you up a user on a test n8n instance could you try on that as well and let me know if you can reproduce the issue there as well? |
@Joffcom Happy to, let me know what you need me to do 👍 |
Hey @jbusuttil, Good news, I am not sure how it happened but at some point over the weekend I got the same error. The only thing I noticed was I think the Version of firefox was a bit older. I am getting a new dev ticket made for this now so we can get to the bottom of it. |
Thanks @Joffcom - I have an uncanny knack of triggering obscure bugs, thanks for investigating |
Just chiming in that I also got this now without ever using a recovery code. |
I have tried everything mentioned in the thread to replicate the issue, and I have not been able to. @jbusuttil @NoLooseEnds did you keep encountering this issue? |
@RicardoE105 The problem became much less frequent in the stable versions released around late January / early February (2024), then went away almost entirely in subsequent stable releases. I think I've only seen the message pop up literally once in the last couple of months as of time of writing. |
@RicardoE105 When I got the notification from github I tried to force the issue by login in via incognito mode, but got rate limited on the login and did not have time to test until today. And unfortunately I still get the error. Running 1.41.0 Let me know if you need anything. |
I'm not certain if the bug was that the recovery codes were actually getting used up, or if the notification popup was incorrectly getting triggered, but for now the the code that triggered the notification has been removed since I think we can close this issue for now. If someone finds an related issue with MFA, we can then re-open this. |
Describe the bug
When using 2FA authentication using an authenticator app, after 10 logins, a pop-up message will indicate all backup passcodes have been consumed, and will suggest disabling and re-enabling 2FA to regenerate passcodes.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
2FA using authenticator app should not (appear to) consume backup passcodes
Environment (please complete the following information):
Additional context
[Updated] Vanilla install using
npm install -g n8n
The text was updated successfully, but these errors were encountered: