refactor: implement 2FA stubs and remove dead BoostPurchase component #35

Open
Charon wants to merge 1 commit from feat/implement-stubs into dev
Member

Summary

  • Issue #15: Replaced the five 2FA stub methods in Settings.php with real implementations that delegate to the TwoFactorAuthenticatable trait from php-tenant. The 2FA tab now auto-enables when the User model uses the trait, and handles the full lifecycle: enable, verify/confirm, view/regenerate recovery codes, and disable.
  • Issue #16: Removed the orphaned BoostPurchase Livewire component and its blade template. The /boosts route already redirects to the account usage page's boosts tab, making this component dead code.
  • Updated language strings: removed the old "upgrading" stub message and added proper 2FA success/error messages.

Fixes #15
Fixes #16

Test plan

  • Verify 2FA tab appears in Settings when User model uses TwoFactorAuthenticatable
  • Verify 2FA tab is hidden when trait is not present
  • Test enable flow: QR code displays, secret key shown, code verification works
  • Test disable flow: 2FA removed, UI resets
  • Test recovery codes: view and regenerate
  • Verify /hub/boosts redirect still works (goes to usage?tab=boosts)
  • Confirm no references to removed BoostPurchase component remain in routes

🤖 Generated with Claude Code

## Summary - **Issue #15:** Replaced the five 2FA stub methods in `Settings.php` with real implementations that delegate to the `TwoFactorAuthenticatable` trait from `php-tenant`. The 2FA tab now auto-enables when the User model uses the trait, and handles the full lifecycle: enable, verify/confirm, view/regenerate recovery codes, and disable. - **Issue #16:** Removed the orphaned `BoostPurchase` Livewire component and its blade template. The `/boosts` route already redirects to the account usage page's boosts tab, making this component dead code. - Updated language strings: removed the old "upgrading" stub message and added proper 2FA success/error messages. Fixes #15 Fixes #16 ## Test plan - [ ] Verify 2FA tab appears in Settings when User model uses `TwoFactorAuthenticatable` - [ ] Verify 2FA tab is hidden when trait is not present - [ ] Test enable flow: QR code displays, secret key shown, code verification works - [ ] Test disable flow: 2FA removed, UI resets - [ ] Test recovery codes: view and regenerate - [ ] Verify `/hub/boosts` redirect still works (goes to usage?tab=boosts) - [ ] Confirm no references to removed BoostPurchase component remain in routes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Charon added 1 commit 2026-03-24 16:44:37 +00:00
Replace the five 2FA stub methods in Settings with real implementations
that delegate to the TwoFactorAuthenticatable trait from php-tenant.
The 2FA tab now auto-enables when the User model uses the trait, and
handles the full lifecycle: enable, verify, confirm, view/regenerate
recovery codes, and disable.

Remove the orphaned BoostPurchase Livewire component and its blade
template. The /boosts route already redirects to the account usage
page's boosts tab, making this component dead code.

Update language strings: remove the old "upgrading" stub message and
add proper 2FA success/error messages.

Fixes #15
Fixes #16

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/implement-stubs:feat/implement-stubs
git checkout feat/implement-stubs

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout dev
git merge --no-ff feat/implement-stubs
git checkout feat/implement-stubs
git rebase dev
git checkout dev
git merge --ff-only feat/implement-stubs
git checkout feat/implement-stubs
git rebase dev
git checkout dev
git merge --no-ff feat/implement-stubs
git checkout dev
git merge --squash feat/implement-stubs
git checkout dev
git merge --ff-only feat/implement-stubs
git checkout dev
git merge feat/implement-stubs
git push origin dev
Sign in to join this conversation.
No description provided.