File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
FirebaseAuthSwiftUI/Sources/Services
FirebasePhoneAuthSwiftUI/Sources/Services Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ public final class AuthService {
141141 private var listenerManager : AuthListenerManager ?
142142
143143 var emailSignInEnabled = false
144- private var emailSignInCallback : ( @ MainActor ( ) -> Void ) ?
144+ private var emailSignInCallback : ( ( ) -> Void ) ?
145145
146146 private var providers : [ AuthProviderUI ] = [ ]
147147
@@ -324,7 +324,7 @@ public extension AuthService {
324324 }
325325
326326 /// Enable email sign-in with custom callback
327- func withEmailSignIn( onTap: @escaping @ MainActor ( ) -> Void ) -> AuthService {
327+ func withEmailSignIn( onTap: @escaping ( ) -> Void ) -> AuthService {
328328 emailSignInEnabled = true
329329 emailSignInCallback = onTap
330330 return self
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public extension AuthService {
3232
3333 /// Register phone sign-in with custom behavior
3434 @discardableResult
35- func withPhoneSignIn( onTap: @escaping @ MainActor ( ) -> Void ) -> AuthService {
35+ func withPhoneSignIn( onTap: @escaping ( ) -> Void ) -> AuthService {
3636 registerProvider ( providerWithButton: PhoneAuthProviderAuthUI ( onTap: onTap) )
3737 return self
3838 }
Original file line number Diff line number Diff line change @@ -26,14 +26,17 @@ public class PhoneAuthProviderAuthUI: AuthProviderUI {
2626 public let id : String = " phone "
2727
2828 // Callback for when the phone auth button is tapped
29- private let onTap : @ MainActor ( ) -> Void
29+ private let onTap : ( ) -> Void
3030
31- public init ( onTap: @escaping @ MainActor ( ) -> Void ) {
31+ public init ( onTap: @escaping ( ) -> Void ) {
3232 typedProvider = PhoneProviderSwift ( )
3333 self . onTap = onTap
3434 }
3535
3636 @MainActor public func authButton( ) -> AnyView {
37- AnyView ( PhoneAuthButtonView ( onTap: onTap) )
37+ let mainActorClosure : @MainActor ( ) -> Void = {
38+ self . onTap ( )
39+ }
40+ return AnyView ( PhoneAuthButtonView ( onTap: mainActorClosure) )
3841 }
3942}
You can’t perform that action at this time.
0 commit comments