Can't import user account with CLI Firebase auth:import command

后端 未结 2 2073
抹茶落季
抹茶落季 2021-01-05 22:46

I need to import a list of users, with email and password, in Firebase.

I\'m trying to import users in Firebase using the CLI auth:import command. (https://firebase

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-05 23:06

    It seems that your password hash is not correct. Could you point out how do you generate HMAC_MD5 hash?

    I use the following NodeJS code snippet to create HMAC_MD5 password hash.

    var crypto = require('crypto');
    crypto.createHmac('md5', 'helpmeplease').update('mypass').digest().toString('base64');
    

    And I get "OlI3f2Y10phDYBOVOhzk3Q==" as a result. Then I use the command in your post to import user to Firebase Auth. I verified I can sign in successfully.

提交回复
热议问题