Add MFA enroll, disable, and login verification - #16
Merged
Conversation
Adds design note and ADR-021 for pending pre-verification JWT handling, verify-2-factor login challenge, and Settings QR enroll/disable. Updates ARCHITECTURE and ADR-020 follow-ups. Co-authored-by: Gerben Jongerius <gjong@users.noreply.github.com>
Detect PRE_VERIFICATION_USER JWTs after password login and hold them in memory until verify-2-factor succeeds, then activate the full session. Settings gains QR enroll/enable and confirmed disable via the 2-factor API. Co-authored-by: Gerben Jongerius <gjong@users.noreply.github.com>
Use RequestBody for verify interceptor test and match CurrencyRepository.sync return type in Verify2FactorViewModelTest. Co-authored-by: Gerben Jongerius <gjong@users.noreply.github.com>
Clear pending MFA on system back, refresh Settings MFA status on resume, show an error/retry state when profile load fails on MFA setup, keep pending credentials after invalid OTP, and parse JWT roles with Moshi. Co-authored-by: Gerben Jongerius <gjong@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/mfa-enroll-verify-25b7
branch
from
July 27, 2026 19:53
62061a4 to
cbd8278
Compare
gjong
marked this pull request as ready for review
July 27, 2026 19:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Second slice of the auth epic (roadmap #34), following merged PR #15 (API token sessions).
PRE_VERIFICATION_USERJWTs after password login and hold them in memory (PendingMfaSession) untilPOST …/verify-2-factorsucceeds — only then callactivateSession.Screen.Verify2Factor) with system-back clearing pending MFA.GET/PATCH …/2-factor) and confirmed disable; Settings MFA subtitle refreshes on resume.Still deferred: OIDC / AppAuth /
.well-knownconsumption.Design
docs/design/mfa-enroll-verify.mddocs/adr/021-mfa-enroll-verify.mdTest plan
./gradlew testDebugUnitTest --no-daemon(pass)./gradlew lintDebug --no-daemon./gradlew assembleDebug --no-daemon