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

Auth not Shared Correctly with App Groups #6876

Closed
ccjernigan opened this issue Oct 30, 2020 · 6 comments
Closed

Auth not Shared Correctly with App Groups #6876

ccjernigan opened this issue Oct 30, 2020 · 6 comments
Labels
api: auth extensions For iOS extensions targets (i.e. share, messages) internal-bug-filed macOS Issues or feature requests for macOS.

Comments

@ccjernigan
Copy link

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.1
  • macOS version: 10.15.7
  • Firebase SDK version: 7.0.0
  • Installation method: Swift Package
  • Firebase Component: Auth

[REQUIRED] Step 2: Describe the problem

Firebase Auth is not properly shared between multiple bundles within the same app group.

I have a macOS app where the main app and a second process (in the same app bundle) share the same app group. After the main app signs in, the second process launches via SMLoginItemSetEnabled as part of the setup process. When the second process touches Firebase Auth, a system password prompt appears to grant keychain access (for a keychain item named for my API key).

Steps to reproduce:

  1. Create an app that uses app groups and has a sub-bundle that runs in a second process
  2. Sign into Firebase with the main app (call Auth.auth().useUserAccessGroup(AppGroupId) first)
  3. Launch the second process, which should call Auth.auth().useUserAccessGroup(AppGroupId) and listens for auth changes Auth.auth().addStateDidChangeListener({ (_, user) in ... })

Results:
Actual: Second process triggers a system keychain dialog asking for a password.
Expected: No keychain dialog should appear, since these are using a shared app group

I realize that macOS is "community supported" although this seems to be a bug that should be resolved to better support app extensions and other multiprocess use cases.

@ryanwilson ryanwilson added the macOS Issues or feature requests for macOS. label Nov 2, 2020
@malcolmdeck
Copy link

Hey there! I've filed b/172260275 to track this issue internally.

@ZComwiz
Copy link

ZComwiz commented Nov 24, 2020

@malcolmdeck could this be related to why on the Mac I am getting a token mismatch but on iOS with the same bundleID— it works fine when using Auth() for phone login?

@paulb777 paulb777 added the extensions For iOS extensions targets (i.e. share, messages) label Dec 5, 2020
@OGmetamonkey
Copy link

OGmetamonkey commented Jun 30, 2021

Did anything come of this? When you say "shared app group", does that include an extension within the main app? If so, I'm having the same issue.iOS Extension authentication in Firestore

@OGmetamonkey
Copy link

Hey there! I've filed b/172260275 to track this issue internally.

Any way you can tell me how I track this bug #?

@kamilpowalowski
Copy link
Contributor

kamilpowalowski commented Nov 25, 2021

@OGmetamonkey @ccjernigan I have the same issue in the macOS extension. Did you manage to solve it?

@rosalyntan
Copy link
Member

Should be fixed in #9102.

@firebase firebase locked and limited conversation to collaborators Jan 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: auth extensions For iOS extensions targets (i.e. share, messages) internal-bug-filed macOS Issues or feature requests for macOS.
Projects
None yet
Development

No branches or pull requests

10 participants