How to set hash-key option for auth:import after default auth:export in firebase?

后端 未结 2 979
孤独总比滥情好
孤独总比滥情好 2021-02-05 08:34

I\'ve got my users exported the in CLI:

firebase auth:export my_users.json

The passwords in the exported file should be hashed with SCRYPT, bec

2条回答
  •  半阙折子戏
    2021-02-05 09:00

    So you can now get the hash key and the salt info from the firebase console GUI. I had to enter incognito mode in chrome for some reason (firebase support suggested this).

    I could then log into my firebase console in the incognito browser.

    (Note that you need to use the firebase instance that you are copying users from, not the one that you are copying users to)

    You click on Authentication -> Users and then click on the three vertical dots next to the reload button and a popup menu will show up with a single menu item: "Password hash parameters".

    Click on this menu item and all of the settings you need for doing the firebase auth:import command will show up. Here's what I see:

    hash_config {
      algorithm: SCRYPT,
      base64_signer_key: ,
      base64_salt_separator: ,
      rounds: 8,
      mem_cost: 14,
    }
    

    I can then do the command successfully

    firebase auth:import ./users.json --hash-algo=scrypt --rounds=8 --mem-cost=14 --hash-key= --salt-separator=
    

提交回复
热议问题