Skip to content

fix: 2FA security and GDPR compliance issues#786

Merged
orbitlumen-hue merged 5 commits into
DogStark:mainfrom
Mimah97:feature/2fa-and-gdpr-fixes
Jul 25, 2026
Merged

fix: 2FA security and GDPR compliance issues#786
orbitlumen-hue merged 5 commits into
DogStark:mainfrom
Mimah97:feature/2fa-and-gdpr-fixes

Conversation

@Mimah97

@Mimah97 Mimah97 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes four critical security and compliance issues in 2FA setup, backup code management, and GDPR consent tracking.

Changes

#688 — TwoFactorSettings race condition on page load

  • Added tokens?.accessToken to effect dependency array so status fetch retries once token hydrates
  • Added loading state instead of showing incorrect "Disabled" default during initial render

#690 — TwoFactorSetup backup code acknowledgment

  • Added checkbox requirement ("I have saved my backup codes") before "Enable 2FA" becomes clickable
  • Prevents users from completing setup without acknowledging backup codes

#689 — Backup code regeneration authentication

  • Modified generateBackupCodes API to accept TOTP token verification
  • Added confirmation dialog stating existing codes will be invalidated
  • Requires fresh TOTP entry before generation in both TwoFactorRecovery and TwoFactorSettings components
  • Prevents stolen tokens from silently regenerating backup codes as a 2FA bypass

#691 — GDPR consent timestamp accuracy

  • Now sources consent timestamp from server preferences instead of localStorage
  • Only updates timestamp on false→true transition of dataShareConsent, not on every save
  • Ensures consent timestamp reflects actual consent event, not last unrelated settings update
  • Consistent across devices/browsers

Closes #688, Closes #690, Closes #689, Closes #691

@drips-wave

drips-wave Bot commented Jul 23, 2026

Copy link
Copy Markdown

@Mimah97 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@orbitlumen-hue

Copy link
Copy Markdown
Collaborator

resolve conflicts

@orbitlumen-hue
orbitlumen-hue merged commit 49c8080 into DogStark:main Jul 25, 2026
7 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment