问题描述
我在我的应用程序上进行了客户端登录,一切正常.现在,我需要将客户端的UID传递给Node.
I have client-side login on my app which is working just fine. Now I need to pass the clients UID to Node.
在Firebase文档中找到了验证ID令牌,但我只是不知道我该怎么做:通过HTTPS将令牌发送到您的后端"
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"
推荐答案
您的Node服务器端部分是否已创建API,还是需要构建该API?
Does your Node server-side piece have an API already created, or do you need to build that?
有很多方法可以将这些信息从客户端传递到服务器.有时,身份验证信息会在执行其他操作的API调用的HTTP标头中传递.有时,API包括一个特定的调用,以在后端注册"用户,您将在该调用的有效负载中将客户端令牌传递给服务器.
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.
这篇关于如何通过HTTPS将Firebase令牌发送到后端(节点/快速)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!