Firebase import users from existing app
How do I import an existing app's users into firebase's Simple Login with email / password.
I have keys and hashes and a user collection with user data. Is it possible to just import it or do I have to use firebase's user api.
The current best way to import existing user accounts from another service into Firebase for use within Firebase Simple Login is to call createUser(email, password, callback)
for each of the email address / password combinations, provided you have them. There is currently no out-of-the-box way to import user email addresses and password hashes into Firebase Simple Login, though ping support@firebase.com and there may be a way to do this.
If you already have an existing authentication mechanism that you'd like to continue using, rather than using Firebase Simple Login, check out custom token generation, which will allow you to continue using your existing authentication. This would require you to generate a JSON Web Token (JWT) when each user authenticates, and this token's payload could then be used in your security rules, as described here: https://www.firebase.com/docs/security/security-rules.html.
It is now possible to export/import users in Firebase v3.x. All you have to do is install Firebase CLI (Firebase Tools), setup a folder on your machine representing tooling mirror for your Firebase project. (as simple as firebase init
in the appropriate folder)
To Export: auth:export
To Import: auth:import
Update: At the time I wrote this answer, given example in link above for auth:import
has 2 pieces missing: hash key
and salt separator
, which you can ask from customer support. Maybe they share it with tools or from console in the future.
上一篇: 使用IF语句的ABSOLUTE? Python 2.5
下一篇: Firebase从现有应用导入用户