firebase sdk id token get code example
Example: firebase phone authentication web result doesnt have accessToken
firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idToken) { // Send token to your backend via HTTPS // ...}).catch(function(error) { // Handle error});