See this for the 'latest' documentation.
authWithCustomToken is now signInWithCustomToken (firebase version 3.x)
Example from the documentation:
firebase.auth().signInWithCustomToken(token).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
if (errorCode === 'auth/invalid-custom-token') {
alert('The token you provided is not valid.');
} else {
console.error(error);
}
});