RocketChat / RocketChat/Rocket.Chat

Possibility to restrict/decrease TOTP lengh - cureent 52

Open
#27,101 0 comments 0 reactions 0 assignees View on GitHub

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:
  1. user setting
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.