RocketChat / RocketChat/Rocket.Chat

refactor(account): replace TextCopy with CodeSnippet in TwoFactorTOTP

Open
#39,110 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: feature
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description

The TwoFactorTOTP.tsx component currently uses the legacy TextCopy component to display the TOTP secret key during two-factor authentication setup. This should be replaced with the modern CodeSnippet component from @rocket.chat/fuselage for consistency.

File: apps/meteor/client/views/account/security/TwoFactorTOTP.tsx (Line 156)

Current behavior

Uses a custom TextCopy component imported from ../../../components/TextCopy to display the TOTP secret with copy functionality.

Expected behavior

Use CodeSnippet from @rocket.chat/fuselage with useClipboard from @rocket.chat/fuselage-hooks, following the same pattern already used in:

  • BackupCodesModal.tsx (same directory)
  • Installation.tsx (merged in #38757)

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 with apps/meteor/client/views/account/security/TwoFactorTOTP.tsx at the TOTP secret display, then compare the existing patterns in BackupCodesModal.tsx and Installation.tsx. Replace the legacy TextCopy usage with the stated CodeSnippet and useClipboard pattern, and verify that setup still displays and copies the secret key.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.