File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
FirebaseSwiftUI/FirebaseFacebookSwiftUI/Sources/Services
samples/swiftui/FirebaseSwiftUIExample/FirebaseSwiftUIExample Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ import FirebaseAuthSwiftUI
10
10
public extension AuthService {
11
11
@discardableResult
12
12
func withFacebookSignIn( scopes scopes: [ String ] ? = nil ) -> AuthService {
13
- facebookProvider = FacebookProviderSwift ( scopes: scopes)
13
+ facebookProvider = FacebookProviderAuthUI ( scopes: scopes)
14
+ register ( provider: facebookProvider!)
14
15
return self
15
16
}
16
17
}
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ public enum FacebookProviderError: Error {
21
21
case authenticationToken( String )
22
22
}
23
23
24
-
25
24
public class FacebookProviderAuthUI : FacebookProviderAuthUIProtocol {
26
25
public let id : String = " facebook "
27
26
let scopes : [ String ]
@@ -36,7 +35,7 @@ public class FacebookProviderAuthUI: FacebookProviderAuthUIProtocol {
36
35
rawNonce = CommonUtils . randomNonce ( )
37
36
shaNonce = CommonUtils . sha256Hash ( of: rawNonce)
38
37
}
39
-
38
+
40
39
@MainActor public func authButton( ) -> AnyView {
41
40
AnyView ( SignInWithFacebookButton ( ) )
42
41
}
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ struct ContentView: View {
35
35
phoneAuthProvider: phoneAuthProvider
36
36
)
37
37
. withGoogleSignIn ( )
38
+ . withFacebookSignIn ( )
38
39
}
39
40
40
41
var body : some View {
41
42
AuthPickerView {
42
- SignInWithFacebookButton ( )
43
43
PhoneAuthButtonView ( )
44
44
} . environment ( authService)
45
45
}
You can’t perform that action at this time.
0 commit comments