I\'m using Firebase Admin for login in my NodeJs app. Client will login by sending an idToken (which is get from Firebase), and then NodeJs server will get the user by using adm
That specific information will not be available in the ID token. You will need to use the Firebase Admin SDK to lookup the user and inspect the providerData:
admin.auth().getUser(uid)
.then(function(userRecord) {
// Assuming the first provider linked is facebook.
// The facebook ID can be obtained as follows.
console.log(userRecord.providerData[0].uid);
})
.catch(function(error) {
console.log("Error fetching user data:", error);
});