"An Error Occurred While Accessing the Keychain" When Signing in Using Firebase

An error occurred when accessing the keychain

I didn't add the Team ID prefix before my App ID, so it didn't work. You need to have an Apple Developer Account and a Team ID in order to do this, like this:

Auth.auth().useUserAccessGroup("XK********.com.matkonit.SharedItems")

Xcode 11 Firebase auth for Mac app has error An error occurred when accessing the keychain

Add Keychain Sharing Capability to the target's build settings. More context here.

Click the + Capability and then choose Keychain Sharing Capability

Sample Image

Error when accessing keychain with Firebase iOS 10

As mentioned in the link of the first answer there is a workaround:

  1. Go to your *.xcodeproj
  2. Go to the tab "Capabilities"
  3. Activate "Keychain Sharing"


Btw, is there an issue tracker for xcode?

Firebase Auth Signout Error - Swift

You need to enable the Keychain Sharing entitlement.

From the Project Navigator, go to your project settings and find your target. Under the Capabilities tab, turn on Keychain Sharing.

I had the same problem trying to create a new user. I'm not sure exactly why Firebase needs this permission now, but it works.

Swift cross-app authentication is not working

After a bit of discussion with Firebase support, the issue that I had was that the keychain access group needs to read like this:

<TEAM_ID>.<APP_NAME>.<GROUP_NAME> 

There is also a bug in Xcode where when you add this via the capabilities section, $(AppIdentifierPrefix) is added, this is wrong. Also, the keychain access group needs to be consistent throughout the apps. Once I added fixed this everything was working fine.

Firebase swift Cross-app user sharing not working

So, after several attempts under my thoughts that it was my setup of the keychain group, it ended up being that I was calling the code too early (right after configuring the FirebaseApp), so it just failed. Moving the code out of viewDidLoad and into a method called by a method channel right before login (for the app) and before I needed the user to populate the today extension worked for me.



Related Topics



Leave a reply



Submit