Error getting credential from Apple on linking with popup with firebase

0



In my web projet I'm implementing link with popup with Apple as a provider.
I'm allways getting the following error:
Code Block
code: "auth/invalid-credential"
message: "Error getting access token from https:/appleid.apple.com, OAuth2 redirect uri is: https:/myproject.firebaseapp.com/__/auth/handler, response: OAuth2TokenResponse{params: error=invalid_client, httpMetadata: HttpMetadata{status=400, cachePolicy=NO_CACHE, cacheDurationJava=null, cacheImmutable=false, staleWhileRevalidate=null, filename=null, lastModified=null, retryAfter=null, headers=HTTP/1.1 200 OK

Here is my code:
Code Block
AppleLink = function () {
let provider = new firebase.auth.OAuthProvider('apple.com');
provider.addScope('email');
provider.addScope('name');
firebase.auth().languageCode = 'pt';
linkWithProvider(provider);
};
linkWithProvider = function (provider) {
let email = 'some@email.com';
let pass = 'somepassword';
firebase.auth().signInWithEmailAndPassword(email, pass).then(function (result) {
var user = result.user;
if (user) {
user.linkWithPopup(provider).then(function (result) {
providerinput = true;
});
}
}).catch(function (error) {
let errorCode = error.code;
});
};

How do I get pass that error?
Same here.
Same Error

Code
Code Block
  async appleSignin() {
    const provider = new auth.OAuthProvider('apple.com');
    provider.addScope('name')
    provider.addScope('email')
    const credential = await this.afAuth.signInWithPopup(provider);
    return this.updateUserData(credential.user);
  }


Error
Code Block
core.js:4197 ERROR Error: Uncaught (in promise): Error: Error getting access token from https://appleid.apple.com, OAuth2 redirect uri is: https://---firebaseapp.com/__/auth/handler, response: OAuth2TokenResponse{params: error=invalid_client, httpMetadata: HttpMetadata{status=400, cachePolicy=NO_CACHE, cacheDurationJava=null, cacheImmutable=false, staleWhileRevalidate=null, filename=null, lastModified=null, retryAfter=null, headers=HTTP/1.1 200 OK




Same here
What worked for me was double checking that values "Apple team ID", "Key ID" and "Private Key", the inputs for authentication with Apple in the Firebase developer console, were correct.
What about the Service ID? You didnt put that one on?
Same here
same issue
same here too :'(

Same issue. Make sure you use the KEY ID (something like 78N8S6XAVY) and not the key name that you gave it.

See key details by clicking the keyname.

Same here. Pretty sure of having right all the parameters (key Id, service id and team Id)? Did you find any solution? Apple support didn't help...

I have the same issue, I have added key id (kid), private key, service ID to the Firebase Console. I've connected the key id to the service id and enabled login service with all domains and subdomains with the correct redirect-url.

Did you enter the correct Apple Team ID that should be found here? https://developer.apple.com/account#MembershipDetailsCard

Did you enter the correct Apple Team ID that should be found here? https://developer.apple.com/account#MembershipDetailsCard

I had to add client_id:

  provider.setCustomParameters({
    client_id: '[SIGN IN WITH APPLE SERVICE ID]',
  })

... as it doesn't appear to be added by default (for me)

Error getting credential from Apple on linking with popup with firebase
 
 
Q