gpt4 book ai didi

firebase - 我可以使用 auth :import and auth:export tools with the Firebase Auth Emulator?

转载 作者:行者123 更新时间:2023-12-03 16:17:11 29 4
gpt4 key购买 nike

我想在启动时使用我的测试用户帐户预加载 firebase auth 模拟器,就像我对 Firestore 模拟器及其导入/导出选项所做的一样。我尝试在模拟器运行时使用 auth:import 和 auth:export,但它连接到我们实际的开发 firebase 项目,而不是模拟器。无论如何要针对身份验证模拟器运行 auth:import 和 auth:export 吗?
作为引用,我指的是这些命令( https://firebase.google.com/docs/cli/auth )和这个模拟器( https://firebase.google.com/docs/emulator-suite/connect_auth )。

最佳答案

现在已将执行此操作的功能添加到 firebase 工具中
较旧的答案仍然有效并且可能有用

https://github.com/firebase/firebase-tools/releases/tag/v9.1.0

Support emulators:export and import for Auth Emulator (#2955).

https://github.com/firebase/firebase-tools/pull/2955

firebase help auth:import
Usage: firebase auth:import [options] [dataFile]

import users into your Firebase project from a data file(.csv or .json)

Options:
--hash-algo <hashAlgo> specify the hash algorithm used in password for these accounts
--hash-key <hashKey> specify the key used in hash algorithm
--salt-separator <saltSeparator> specify the salt separator which will be appended to salt when verifying password. only used by SCRYPT now.
--rounds <rounds> specify how many rounds for hash calculation.
--mem-cost <memCost> specify the memory cost for firebase scrypt, or cpu/memory cost for standard scrypt
--parallelization <parallelization> specify the parallelization for standard scrypt.
--block-size <blockSize> specify the block size (normally is 8) for standard scrypt.
--dk-len <dkLen> specify derived key length for standard scrypt.
--hash-input-order <hashInputOrder> specify the order of password and salt. Possible values are SALT_FIRST and PASSWORD_FIRST. MD5, SHA1, SHA256, SHA512, HMAC_MD5, HMAC_SHA1, HMAC_SHA256, HMAC_SHA512 support this flag.
-h, --help output usage information

关于firebase - 我可以使用 auth :import and auth:export tools with the Firebase Auth Emulator?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64771219/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com