Skip to content

Conversation

russellwheatley
Copy link
Member

@russellwheatley russellwheatley commented Oct 3, 2025

Full flow for MFA.

  • TOTP and SMS enrolment.
  • TOTP and SMS management from signed-in view (SignedInView). Can add and remove factors from this state.
  • TOTP and SMS un-enrolment from signed in state.
  • UI tests for enrolment flow for SMS, does not have TOTP as it's not supported by emulator.
  • UI tests for removing factors from sign-in state.
  • UI tests for SMS resolution (up to the point of signing in as it fails here due to lack of emulator support).

@russellwheatley russellwheatley changed the title feat: MFA enrolment flow feat: Multi factor Authentication Oct 3, 2025
@russellwheatley russellwheatley marked this pull request as ready for review October 3, 2025 14:09
@russellwheatley russellwheatley changed the base branch from refactor-api to development October 7, 2025 12:52
}

func reauthenticateCurrentUser(on user: User) async throws {
if let providerId = signedInCredential?.provider {
Copy link

@demolaf demolaf Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use a guard here instead and throw AuthServiceError.reauthenticationRequired("Recent login required to perform this operation.")

.font(.headline)
.padding(.horizontal)

ForEach(enrolledFactors, id: \.uid) { factor in
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can MultiFactorInfo conform to Identifiable, where id is a computed property from uid?

Copy link

@demolaf demolaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants