dongzhuo3059 2017-01-17 10:52
浏览 58
已采纳

如何使用golang在Firebase中创建用户?

Is there any way to create a user in Firebase using Userame, Email and Password with Golang. A user can be created with Javascript using createUserWithEmailAndPassword(email, password) But I need the same with Golang. Is there a package or function available? I am using firego to connect with Firebase.

  • 写回答

2条回答 默认 最新

  • douye7033 2017-01-17 14:58
    关注

    There is no Firebase SDK for Go. But certain parts of Firebase have a REST API that allows you to use those features from almost any platform/technology. The Firebase Database is one of those features and the Firego library is a wrapper around the REST API of the Firebase Database for Go developers.

    Unfortunately there is no REST API for creating users in Firebase Authentication. So it won't be possible to create users through Firego or through a public REST API from your Go code.

    The simplest solution would be to create a REST endpoint on a app server you control, where you then use the Firebase Admin SDK to create the user.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?