firebase PHP: create user

橙三吉。 提交于 2020-01-05 08:55:06

问题


I have data that I need to save into firebase from a user. My Firebase schema is like..

{
   users: {
      1: {
         data..

Is it possible to create a new Firebase user in PHP so that I can use the generated user_id to save the data?


回答1:


I'm not sure I fully understand your questions. If you're trying to authenticate a client as a given user, you need to generate an authentication token, place it in the page, and have the client call auth() with that token. See the docs here:

https://www.firebase.com/docs/security/custom-login.html

If you're merely trying to write some data into Firebase at the /users location from PHP, you can do so with the REST API:

https://www.firebase.com/docs/rest-api.html



来源:https://stackoverflow.com/questions/16882744/firebase-php-create-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!