I'm trying to authenticate my users using email and password from the server, using firebase and sending the token generated to the client.
In the server-side, I'm using a nodejs firebase function, and the token is created using the firebase rest auth API, using the verifyPassword endpoint, then I use the token generated and send it to the client.
I'm using in the client firebase.auth().signInWithCustomToken(token) to try to sign in, but I get me a invalid token response.
What I'm trying to do is allow to authenticate the user in both sides, the server, and WebClient .
Is this possible or there is a better way to do it?