[英]How to Connect Firebase Auth Emulator With Python
我是 python 的新手,正在嘗試弄清楚如何將我的 auth 模擬器與 python 項目連接起來。 實際上,我想在模擬器上創建用戶,但是當我創建一個用戶時,它是在我的實時 firebase 項目上創建的
如果有人知道解決方案,請告訴我,我將非常感激!
如果這對其他人有幫助,這就是我在 python 中設法連接和使用身份驗證模擬器的方式:
# Import auth from firebase admin
from firebase_admin import auth
# Set the auth emulator environment variable to the correct port, as shown when starting up the emulator.
if USE_EMULATOR == 'True':
os.environ["FIREBASE_AUTH_EMULATOR_HOST"] = "127.0.0.1:9099"
user = auth.create_user(email=email, password=password )
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.