RocketChat / RocketChat/Rocket.Chat
Possibility to restrict/decrease TOTP lengh - cureent 52
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Hi, there
Description:
We want to use NFC programming tokens - max 32 chars. But current setting seems to be 52 (hardcoded)
Steps to reproduce:
- user setting
- enable 2FA
Expected behavior:
Expected TOTP created
Actual behavior:
Created TOTP with 52 chars
Additional context
We tried to change code in program/server/app/app.js to something like speakeasy.generateSecret({length: 20}); and restarted server, btw no effect.
Regards
Contributor guide
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 in program/server/app/app.js and trace the speakeasy.generateSecret call used during 2FA setup. Check how the generated TOTP length is determined, then verify that the resulting secret can meet the 32-character NFC limit and that the 2FA setup still creates a usable TOTP.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100