firebase / firebase/firebase-ios-sdk

[FR]: Support multiple signed in users (per FirebaseApp name) when using userAccessGroup.

Open
#11,906 1 comment 0 reactions 0 assignees View on GitHub
api: auth extensions type: feature request
Dominant language
C++
Stars
6.7k
Forks
1.8k
Avg merge
2d 14h
Merged PRs (30d)
72

Description

### Description

Currently, FirebaseAuth supports multiple user logins scoped by firebase app name, it will store the credentials using the app name. But if FirebaseAuth is shared to extensions using app access groups, the name based scoping is removed in favor of using a single "firebase_auth_firebase_user" account value. This means 2 things:

1. When using userAccessGroups, any FirebaseAuth instance (scoped by FirebaseApp instances) sign in will be shared across all FirebaseApp instances (which is actually not expected at all).
2. Simultaneous logins are not possible, since there's only a single storage account that is used.

I propose that the firebase name should be added to the keychain account name, to allow multiple logins even when the keychain is shared, or at least make an option to make it opt-in, and let developers decide how to handle multiple logins, instead of disallowing it.

### API Proposal

Ideally, this should have not API changes, but for backwards compatibility, the default app name should resolve to using the current value of the account "firebase_auth_firebase_user", otherwise you might risk users getting signed out when rolling this out.

If there was to be an opt-in approach, there could be an `allowsMultipleLogins` on FirebaseAuth that would change this behavior to the new thing.

### Firebase Product(s)

Authentication

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.