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

Firebase auth and Apple Sign-in with multi-tenancy #3611

Open
pablozandona opened this issue Aug 11, 2020 · 3 comments
Open

Firebase auth and Apple Sign-in with multi-tenancy #3611

pablozandona opened this issue Aug 11, 2020 · 3 comments

Comments

@pablozandona
Copy link

[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.
Screen Shot 2020-08-10 at 15 14 58

But my request return "The identity provider configuration is not found" when I add tenancy configuration in auth.

firebase.auth().tenantId = <MY_TENANT>

I noticed that Identity Provider cofiguration in Google Cloud Console dont have an Apple provider:
Screen Shot 2020-08-10 at 15 11 01

Relevant Code:

    // 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 = '<MY_TENANT>';

  const token = '<APPLE SIGN IN GENERATED 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

@scottcrossen
Copy link
Contributor

b/163837097 For internal tracking.

@george-earp
Copy link

Hi @scottcrossen, do you have any forecast for resolving this issue or workaround ?

@binoypatel
Copy link

It's been a long time so let me just ask you if Apple sign-in is available for multi tenancy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants