firebase PHP:创建用户 [英] firebase PHP: create user
问题描述
我需要将数据保存到用户的Firebase中。我的Firebase架构就像..
{
users:{
1:{
data ..
是否可以在PHP中创建一个新的Firebase用户,以便可以使用生成的user_id保存数据?
我不确定我完全理解你的问题。如果您尝试以给定用户身份验证客户端,则需要生成身份验证令牌,将其放在页面中,然后让客户端使用该令牌调用auth()。请参阅这里的文档:
https://www.firebase.com/docs/security/custom-login.html
如果您只是想将一些数据写入Firebase位于PHP的/ users位置,您可以使用REST API执行此操作:
https://www.firebase.com/docs/rest-api.html
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?
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
这篇关于firebase PHP:创建用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!