Skip to content

Accept XML-prefixed Supabase TOTP QR responses - #97

Merged
Peragus01 merged 1 commit into
mainfrom
fix/operator-mfa-xml-qr
Nov 9, 2026
Merged

Peragus01 merged 1 commit into
mainfrom
fix/operator-mfa-xml-qr

Conversation

@Peragus01

Copy link
Copy Markdown
Owner

Confirmed root cause

Production Auth logs show successful cleanup and enrollment (factor_unenrolled, then factor_in_progress, HTTP 200), while the client raises MFA_INVALID_RESPONSE. The deployed Supabase Auth SVG encoder may prepend an XML declaration. Supabase's own Auth test accepts QR responses that contain <svg>...</svg> rather than requiring the string to start with <svg>.

Fix

  • Extract only the SVG document from the raw response before encoding it as a data URL.
  • Discard any prefix/suffix bytes.
  • Add regression coverage with an XML declaration and trailing newline.

Validation

  • Typecheck passed.
  • ESLint passed.
  • 25 test files / 158 tests passed.
  • Production frontend build passed.
  • No database migrations or financial settings changed.

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
peragus-svm Ready Ready Preview Nov 9, 2026 5:20pm UTC

@Peragus01
Peragus01 merged commit 5277437 into main Nov 9, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — a5d54623 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant