[英]Authentication flow with custom token for Firebase Authentication on cloud functions
I'm creating a game in which I would like to use firebase authentication using cloud functions for logging in and registering users. 我正在创建一个游戏,其中我想使用Firebase身份验证和云功能来登录和注册用户。 Since my dev platform (GameMaker Studio 2) doesn't have the firebase sdk, I've resulted in attempting to use the firebase auth restAPI.
由于我的开发平台(GameMaker Studio 2)没有Firebase SDK,因此导致尝试使用Firebase auth restAPI。 To authenticate a user, I have to at one point create a custom token using the users uID and then use that to login.
要对用户进行身份验证,我必须使用用户的uID创建一个自定义令牌,然后使用该令牌登录。 The problem with this is that I can't really understand the flow of the authentication.
问题是我无法真正理解身份验证流程。 How could the client have knowledge beforehand on it's userID from parameters such as email and password?
客户如何通过诸如电子邮件和密码之类的参数事先了解其用户ID?
Any help in understanding the flow I need to authenticate a user will be greatly appreciated. 我们将非常感谢您在理解我需要认证用户的流程方面的任何帮助。
If you're developing on node.JS, you should be able to use npm to install the firebase package -- that would simplify things greatly. 如果您正在使用node.JS进行开发,则应该能够使用npm安装firebase软件包-这样可以大大简化事情。
Otherwise, the overall flow of authentication should look as follows. 否则,身份验证的总体流程应如下所示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.