Unable to get Sign In with Apple to work on Firebase

Hey all. So I'll keep it short. I registered by App Service ID and Key and everything. I even enabled Apple Sign in from Firebase and got sign in with Apple to work on my Swift iOS app. Now I want it to work on my web app via Vanilla Javascript. When I run the following code on my frontend after initiating firebase, I don't get anything. Like absolutely no error in console or any kind of pop up. I'd appreciate if someone could tell me what I'm doing wrong. Thanks in advance!


const provider = new firebase.auth.OAuthProvider('apple.com');


firebase.auth().signInWithPopup(provider).then((result) => {
/** @type {firebase.auth.OAuthCredential} */
var credential = result.credential;

// The signed-in user info.
var user = result.user;

// You can also get the Apple OAuth Access and ID Tokens.
var accessToken = credential.accessToken;
var idToken = credential.idToken;

// ...
})


.catch((error) => {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// The email of the user's account used.
var email = error.email;
// The firebase.auth.AuthCredential type that was used.
var credential = error.credential;

// ...
});


// Result from Redirect auth flow.
firebase.auth().getRedirectResult().then((result) => {
if (result.credential) {
/** @type {firebase.auth.OAuthCredential} */
var credential = result.credential;

// You can get the Apple OAuth Access and ID Tokens.
var accessToken = credential.accessToken;
var idToken = credential.idToken;

// ...
}
// The signed-in user info.
var user = result.user;
})
.catch((error) => {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// The email of the user's account used.
var email = error.email;
// The firebase.auth.AuthCredential type that was used.
var credential = error.credential;

// ...
});

}
Unable to get Sign In with Apple to work on Firebase
 
 
Q