File tree Expand file tree Collapse file tree
FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Views Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ public struct AuthPickerView<Content: View> {
3535extension AuthPickerView: View {
3636 public var body: some View {
3737 @Bindable var authService = authService
38+ @Bindable var passwordPrompt = authService.passwordPrompt
3839 content()
3940 .sheet(isPresented: $authService.isPresented) {
4041 @Bindable var navigator = authService.navigator
@@ -77,6 +78,10 @@ extension AuthPickerView: View {
7778 )
7879 .interactiveDismissDisabled(authService.configuration.interactiveDismissEnabled)
7980 }
81+ // Centralized password prompt sheet to prevent conflicts
82+ .sheet(isPresented: $passwordPrompt.isPromptingPassword) {
83+ PasswordPromptSheet(coordinator: authService.passwordPrompt)
84+ }
8085 // View-layer logic: Handle account conflicts (auto-handle anonymous upgrade, store others for
8186 // linking)
8287 .onChange(of: authService.currentAccountConflict) { _, conflict in
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ public struct MFAManagementView {
5555
5656extension MFAManagementView: View {
5757 public var body: some View {
58- @Bindable var passwordPrompt = authService.passwordPrompt
5958 VStack(spacing: 20) {
6059 // Title section
6160 VStack {
@@ -133,10 +132,7 @@ extension MFAManagementView: View {
133132 .onAppear {
134133 loadEnrolledFactors()
135134 }
136- // Present password prompt when required for reauthentication
137- .sheet(isPresented: $passwordPrompt.isPromptingPassword) {
138- PasswordPromptSheet(coordinator: authService.passwordPrompt)
139- }
135+ // Password prompt sheet now centralized in AuthPickerView
140136 }
141137
142138 @ViewBuilder
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ public struct SignedInView {
3838
3939extension SignedInView: View {
4040 public var body: some View {
41- @Bindable var passwordPrompt = authService.passwordPrompt
4241 VStack {
4342 Text(authService.string.signedInTitle)
4443 .font(.largeTitle)
@@ -144,9 +143,7 @@ extension SignedInView: View {
144143 )
145144 .presentationDetents([.medium])
146145 }
147- .sheet(isPresented: $passwordPrompt.isPromptingPassword) {
148- PasswordPromptSheet(coordinator: authService.passwordPrompt)
149- }
146+ // Password prompt sheet now centralized in AuthPickerView
150147 .sheet(isPresented: $showEmailVerificationSent) {
151148 VStack(spacing: 24) {
152149 Text(authService.string.verifyEmailSheetMessage)
You can’t perform that action at this time.
0 commit comments