mardi 11 juin 2019

How to refresh a Firebase IDToken serverside (Node.js) if my authentication is being made clientside

I'm developing a webApp with Firebase Authentication, for simplicity and just how things work, I use firebase.auth().signInWithEmailAndPassword() on my client and set the tokenId as a cookie.

On my server (Node.js), I have a middleware that that uses admin.auth().verifyTokenId() from the token set on cookies.

After one hour that token has expired and I can't find a way to refresh it on my server, or a way to reset a new one on my client.




Aucun commentaire:

Enregistrer un commentaire