Post

Replies

Boosts

Views

Activity

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: "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: 	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?
14
0
8.6k
Jul ’20