0
I am trying to run firestore authentication through a custom token (JWT). However I am facing problems to do so. The firestore documentation asks us to install the 'npm firebase-admin' library, download json for authentication and then use the code:
firebase.auth().signInWithCustomToken(token).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// ...
});
However I’m not getting the authentication, it gives me the error:
'signInWithCustomToken failed: First argument "token" must be a Valid string.'
Does anyone know what it can be?
Your token is invalid https://firebase.google.com/docs/auth/admin/create-custom-tokens?hl=pt
– Valdeir Psr
I came to see this page later, thanks @Valdeirpsr
– lucas menezes