NginxProxyManager / NginxProxyManager/nginx-proxy-manager
Disabling 2FA with recovery codes fails because NPM expects only digits
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 34.2k
- Forks
- 3.9k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 20
Description
Checklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latestdocker image?- Yes /
No
- Yes /
- Are you sure you're not using someone else's docker image?
- Yes /
No
- Yes /
- Have you searched for similar issues (both open and closed)?
- Yes /
No
- Yes /
Describe the bug
Somehow my authentication manager (apple passwords) forgot that I had setup 2FA (really weird). So I used a recovery code to login which worked. Then I wanted to disable 2FA to redo the process. It asks for a code, which I dont have and does not accept any of the recovery codes since it contains characters. It feels like I cant continue. I can manage for now, but once I run out of recovery codes I'm screwed.
Nginx Proxy Manager Version
To Reproduce
Steps to reproduce the behavior:
- Login with username and password
- Get asked for verification code and enter a recovery code
- Successfully logged in and at homepage
- Click on account in the right top corner
- Click on
Two-Factor Auth - Click on
Disable two factor authentication - Enter the recovery codes in the textbox
- Click
disable 2fa - See error Internal error
- Check logs to see the following real error: [Express ] › ⚠ warning Token must contain only digits!
-- A clear and concise description of what you expected to happen. -->
I expect it to disable 2FA with recovery codes
Operating System
TrueNas Scale. As an app from the catalogue.
Additional context
If needed I can get some info from the app catalogue.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the account's Two-Factor Auth disable flow and trace the request that produces Express's “Token must contain only digits!” warning. Compare the recovery-code path used during login with the disable request; done means a valid recovery code disables 2FA without the internal error, while digit-based codes retain their behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100