firebase / firebase/firebase-js-sdk
Firebase auth and Apple Sign-in with multi-tenancy
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
### [REQUIRED] Describe your environment
* Operating System version: macOS Mojave 10.14.6
* Browser version: Google Chrome 84.0.4147.105
* Firebase SDK version: 7.17.2
* Firebase Product: auth
### [REQUIRED] Describe the problem
I'm using multi-tenancy in my auth and everything is OK with Facebook and Google. But with Apple Sign-in this don't work.
In firebase console I can to configure Apple witch Sign-in method like the screenshot.

But my request return `"The identity provider configuration is not found"` when I add tenancy configuration in auth.
`firebase.auth().tenantId = `
I noticed that Identity Provider cofiguration in Google Cloud Console dont have an Apple provider:

#### Relevant Code:
```javascript
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "apiKey",
authDomain: "authDomain",
databaseURL: "databaseURL",
projectId: "projectId",
storageBucket: "storageBucket",
messagingSenderId: "messagingSenderId",
appId: "appId",
measurementId: "measurementId"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.auth().tenantId = '';
const token = '';
const provider = new firebase.auth.OAuthProvider('apple.com');
const fCredential = provider.credential(token);
firebase.auth().signInWithCredential(fCredential)
.then(function (r) {
console.log('Response ', JSON.stringify(r));
}, function (e) {
console.log('Error ', JSON.stringify(e));
});
```
NOTE: if remove tenantId will work, user will be authenticate in root
Contributor guide
Research direction
Start with the shown Firebase Auth flow: tenantId, OAuthProvider('apple.com'), provider.credential, and signInWithCredential using SDK 7.17.2. Reproduce the Apple sign-in request with and without tenantId, then trace the authentication path to determine whether tenant-scoped Apple sign-in completes without the identity-provider configuration error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100