File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
FirebaseSwiftUI/FirebaseFacebookSwiftUI/Sources/Services Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import FirebaseAuthSwiftUI
10
10
public extension AuthService {
11
11
@discardableResult
12
12
func withFacebookSignIn( scopes scopes: [ String ] ? = nil ) -> AuthService {
13
- FacebookProviderAuthUI . configureSharedInstance ( scopes: scopes)
13
+ FacebookProviderAuthUI . configureProvider ( scopes: scopes)
14
14
register ( provider: FacebookProviderAuthUI . shared)
15
15
return self
16
16
}
Original file line number Diff line number Diff line change @@ -27,16 +27,14 @@ public class FacebookProviderAuthUI: FacebookProviderAuthUIProtocol {
27
27
// Needed for reauthentication
28
28
var isLimitedLogin : Bool = true
29
29
30
- @MainActor private static var _shared : FacebookProviderAuthUI ?
30
+ @MainActor private static var _shared : FacebookProviderAuthUI =
31
+ . init( scopes: kDefaultFacebookScopes)
31
32
32
33
@MainActor public static var shared : FacebookProviderAuthUI {
33
- guard let instance = _shared else {
34
- fatalError ( " `FacebookProviderAuthUI` has not been configured " )
35
- }
36
- return instance
34
+ return _shared
37
35
}
38
36
39
- @MainActor public static func configureSharedInstance ( scopes: [ String ] ? = nil ) {
37
+ @MainActor public static func configureProvider ( scopes: [ String ] ? = nil ) {
40
38
_shared = FacebookProviderAuthUI ( scopes: scopes)
41
39
}
42
40
You can’t perform that action at this time.
0 commit comments