feat: MFA Enrollment (TOTP)#2238
Merged
Lyokone merged 4 commits intoversion-10.0.0-devfrom Oct 10, 2025
Merged
Conversation
demolaf
reviewed
Oct 10, 2025
Comment on lines
162
to
173
| /** | ||
| * Returns the title text for the current step. | ||
| * | ||
| * This is a convenience method for providing default titles in custom UIs. | ||
| */ | ||
| fun getStepTitle(): String = when (step) { | ||
| MfaEnrollmentStep.SelectFactor -> "Choose Authentication Method" | ||
| MfaEnrollmentStep.ConfigureSms -> "Set Up SMS Verification" | ||
| MfaEnrollmentStep.ConfigureTotp -> "Set Up Authenticator App" | ||
| MfaEnrollmentStep.VerifyFactor -> "Verify Your Code" | ||
| MfaEnrollmentStep.ShowRecoveryCodes -> "Save Your Recovery Codes" | ||
| } |
Member
There was a problem hiding this comment.
maybe we can move this into the enum class itself?
Member
There was a problem hiding this comment.
Also the strings should be localized
demolaf
reviewed
Oct 10, 2025
Comment on lines
175
to
190
| /** | ||
| * Returns helper text for the current step. | ||
| * | ||
| * This is a convenience method for providing default instructions in custom UIs. | ||
| */ | ||
| fun getStepHelperText(): String = when (step) { | ||
| MfaEnrollmentStep.SelectFactor -> "Select a second authentication method to secure your account" | ||
| MfaEnrollmentStep.ConfigureSms -> "Enter your phone number to receive verification codes" | ||
| MfaEnrollmentStep.ConfigureTotp -> "Scan the QR code with your authenticator app" | ||
| MfaEnrollmentStep.VerifyFactor -> when (selectedFactor) { | ||
| MfaFactor.Sms -> "Enter the code sent to your phone" | ||
| MfaFactor.Totp -> "Enter the code from your authenticator app" | ||
| null -> "Enter your verification code" | ||
| } | ||
| MfaEnrollmentStep.ShowRecoveryCodes -> "Store these codes in a safe place. You can use them to sign in if you lose access to your authentication method." | ||
| } |
Member
There was a problem hiding this comment.
maybe we can move this into the enum class itself?
Member
There was a problem hiding this comment.
Also the strings should be localized
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.
Generate TOTP secret + QR URL; verify 6-digit code; store factor with clock drift tolerance.