@@ -44,19 +44,19 @@ public class FacebookProviderAuthUI: AuthProviderSwift, AuthProviderUI, DeleteUs
44
44
45
45
public var provider : AuthProviderSwift { self }
46
46
47
- @MainActor private static var _shared : FacebookProviderAuthUI =
48
- . init( scopes: kDefaultFacebookScopes)
47
+ @MainActor private static var _shared : FacebookProviderAuthUI = FacebookProviderAuthUI ( scopes: kDefaultFacebookScopes)
49
48
50
49
@MainActor public static var shared : FacebookProviderAuthUI {
51
50
return _shared
52
51
}
53
52
54
- @MainActor public static func configureProvider( scopes: [ String ] ? = nil ) {
55
- _shared = FacebookProviderAuthUI ( scopes: scopes)
53
+ @MainActor public static func configureProvider( scopes: [ String ] ? = nil , isLimitedLogin : Bool = true ) {
54
+ _shared = FacebookProviderAuthUI ( scopes: scopes, isLimitedLogin : isLimitedLogin )
56
55
}
57
56
58
- private init ( scopes: [ String ] ? = nil ) {
57
+ public init ( scopes: [ String ] ? = nil , isLimitedLogin : Bool = true ) {
59
58
self . scopes = scopes ?? kDefaultFacebookScopes
59
+ self . isLimitedLogin = isLimitedLogin
60
60
}
61
61
62
62
@MainActor public func authButton( ) -> AnyView {
@@ -68,11 +68,8 @@ public class FacebookProviderAuthUI: AuthProviderSwift, AuthProviderUI, DeleteUs
68
68
try await operation ( on: user)
69
69
}
70
70
71
- @MainActor public func createAuthCredential( ) async throws -> AuthCredential {
72
- return try await signInWithFacebook ( isLimitedLogin: true )
73
- }
74
71
75
- @MainActor public func signInWithFacebook ( isLimitedLogin : Bool ) async throws -> AuthCredential {
72
+ @MainActor public func createAuthCredential ( ) async throws -> AuthCredential {
76
73
let loginType : LoginTracking = isLimitedLogin ? . limited : . enabled
77
74
self . isLimitedLogin = isLimitedLogin
78
75
0 commit comments