firebase / FirebaseUI-iOS

iOS UI bindings for Firebase.
Apache License 2.0
1.5k stars 467 forks source link

[Breaking] Auth.auth().useUserAccessGroup not functioning in iOS 16 #1150

Closed garyhighlinebeta closed 1 year ago

garyhighlinebeta commented 1 year ago

Step 2: Describe your environment

According to docs https://firebase.google.com/docs/auth/ios/single-sign-on#swift it seems to suggest you can use keychain access group or an app group. I want to use app group.

Inside my widget extension I called

init() {
        FirebaseApp.configure()
        let user = try? Auth.auth().useUserAccessGroup("group.com.myorg.myapp")  //app groups id
    }

user is always returned nil here with this exception

2023-06-29 01:14:42.064837-0400 TimeWidgetExtension[83968:13128623] 10.12.0 - [FirebaseAuth][I-AUT000001] Error loading saved user when starting up: Error Domain=FIRAuthErrorDomain Code=17995 "An error occurred when accessing the keychain. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo dictionary will contain more information about the error encountered" UserInfo={FIRAuthErrorUserInfoNameKey=ERROR_KEYCHAIN_ERROR, NSLocalizedFailureReason=SecItemCopyMatching (-34018), NSLocalizedDescription=An error occurred when accessing the keychain. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo dictionary will contain more information about the error encountered}

I've tried using a new simulator and uninstall app. Same thing.

According to this thread, the answer seems to enable keychair sharing. But I want to use app group not keychain access group.

https://github.com/firebase/FirebaseUI-iOS/issues/818

garyhighlinebeta commented 1 year ago

Apologies, I did not setup the app group correctly.

davut commented 9 months ago

Can you provide what you did wrong and how you corrected it?