Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ struct MFALoginView: View {
accentColor: .white,
backgroundColor: .orange
) {
// TODO(ncooke3): Does this task inherit a higher priority? What about the regular SwiftUI
// button?
Task(priority: .userInitiated, operation: startMfALogin)
Task { await startMfALogin() }
}
.padding()
} else {
Expand All @@ -59,7 +57,7 @@ struct MFALoginView: View {
accentColor: .white,
backgroundColor: .orange
) {
Task(priority: .userInitiated, operation: finishMfALogin)
Task { await finishMfALogin() }
}
.padding()
}
Expand Down Expand Up @@ -112,7 +110,10 @@ extension MFALoginView {
let assertion = PhoneMultiFactorGenerator.assertion(with: credential)
do {
_ = try await resolver.resolveSignIn(with: assertion)
dismiss()
// MFA login was successful.
await MainActor.run {
dismiss()
}
} catch {
print(error)
}
Expand All @@ -128,7 +129,9 @@ extension MFALoginView {
do {
_ = try await resolver.resolveSignIn(with: assertion)
// MFA login was successful.
dismiss()
await MainActor.run {
dismiss()
}
} catch {
// Wrong or expired OTP. Re-prompt the user.
// TODO(ncooke3): Show error to user.
Expand Down
Loading