I have an API that I want to secure, I'm thinking of use Firebase ID tokens and include a token in every request, using:
firebase.auth().currentUser.getToken(/* forceRefresh */ true).then(function(idToken) {
// Send token to your backend via HTTPS
}).catch(function(error) {
// Handle error
});
and then verify the token.
Could this slow down the request to the API?