Answer the question
In order to leave comments, you need to log in
How to send idToken to firebase backend for validation?
When authorizing a user for a chat, I get an idToken from firebase, but when rendering a new page, I need to check the token I have on the back end. How to implement a request from the client to the firebase backend to get a response about the validity of the token?
The documentation describes the firebase admin library, but it is for the backend.
Answer the question
In order to leave comments, you need to log in
There is also a Firebase library for the client (it also includes firebase / auth) - doc
Accordingly, you can get the current idToken from it
firebaseApp.auth().currentUser.getIdToken(/* forceRefresh */ true)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question