Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I send Firebase token to backend (Node / Express) via HTTPS

I have client-side login on my app which is working just fine. Now I need to pass the clients UID to Node.

Found this Verify ID Tokens in Firebase docs, but i just don't know how would i actually do this part: "Send token to your backend via HTTPS"

like image 679
VilleKoo Avatar asked Oct 30 '22 00:10

VilleKoo


1 Answers

Does your Node server-side piece have an API already created, or do you need to build that?

There are many ways to pass this information from the client to the server. Sometimes auth information is passed in an HTTP header of an API call that does something else. Sometimes APIs include a specific call to "register" a user with the backend, where you would pass the client-side token to the server in the payload of that one call.

There is no single best way to pass the client user authorization information to the server, every application needs to make that decision as part of their server-side design.

like image 173
Scott Kronheim Avatar answered Nov 15 '22 07:11

Scott Kronheim