Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.3.0] Auth: macOS not working "required entitlement" error #13934

Open
Vincz opened this issue Oct 19, 2024 · 2 comments
Open

[11.3.0] Auth: macOS not working "required entitlement" error #13934

Vincz opened this issue Oct 19, 2024 · 2 comments
Assignees
Labels
api: auth macOS Issues or feature requests for macOS.

Comments

@Vincz
Copy link

Vincz commented Oct 19, 2024

Description

There is an issue with Firebase Auth with macOS.
By default, on a brand new project, running this code:

func signIn(email: String, password: String) {
        print("Signin \(email)")
        Auth.auth().signIn(withEmail: email, password: password) { result, error in
            print("Result signin \(result), error \(error?.localizedDescription ?? "")")
            if let error = error {
                print((error as NSError).userInfo)
        }
    }
}

Will result with the following error (if the credentials are correct) :
Result signin nil, error An error occurred when accessing the keychain. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo dictionary will contain more information about the error encountered ["NSLocalizedDescription": "An error occurred when accessing the keychain. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo dictionary will contain more information about the error encountered", "FIRAuthErrorUserInfoNameKey": "ERROR_KEYCHAIN_ERROR", "NSLocalizedFailureReason": "SecItemAdd (-34018) A required entitlement isn\'t present."]

Adding the Keychain sharing capability with a group and running the code again, will result in the signIn completion handler never get called.

The same code is working as expected in IOS simulator.

Reproducing the issue

No response

Firebase SDK Version

11.3

Xcode Version

16.0

Installation Method

Swift Package Manager

Firebase Product(s)

Authentication

Targeted Platforms

iOS, macOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@djryanash
Copy link

djryanash commented Oct 21, 2024

Yes! I had this issue too but adding Keychain Sharing Capability fixed it.

@paulb777 paulb777 added the macOS Issues or feature requests for macOS. label Oct 22, 2024
@ncooke3 ncooke3 self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: auth macOS Issues or feature requests for macOS.
Projects
None yet
Development

No branches or pull requests

6 participants