RocketChat / RocketChat/Rocket.Chat
chore: Add configurable subject setting for 2FA authentication code email
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Problem Statement
The 2FA authentication email subject is hardcoded as 'Authentication code' in 'EmailCheck.ts' instead of reading from a configurable admin setting.
This is inconsistent with other Rocket.Chat emails like Device Management, Forgot Password, and Verification emails which all read their subject from the settings registry.
Current Behavior
In 'apps/meteor/app/2fa/server/code/EmailCheck.ts' -
subject: 'Authentication code' is hardcoded.
Expected Behavior
The subject should read from a configurable setting following the existing pattern used by other Rocket.Chat email templates, with a default value of '[Site_Name] - Authentication Code'.
Steps to Reproduce
- Set up 2FA via Email
- Trigger a 2FA email
- Observe subject shows generic 'Authentication code' instead of '[Site_Name] - Authentication Code'
Proposed Solution
- Add 'Accounts_TwoFactorAuthentication_By_Email_Subject' setting in 'createAccountSettings.ts'
- Read the setting in 'EmailCheck.ts' via 'settings.get()'
- Add translation key in 'en.i18n.json' with default '[Site_Name] - Authentication Code'
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 with apps/meteor/app/2fa/server/code/EmailCheck.ts and compare how other email templates read subjects from settings. Add the setting in createAccountSettings.ts and its translation in en.i18n.json, then verify that the 2FA email uses the configured subject and defaults to '[Site_Name] - Authentication Code'.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100