[英]How to Connect Firebase Auth Emulator With Python
i am new to python and trying to figure out how to connect my auth emulator with python project.我是 python 的新手,正在尝试弄清楚如何将我的 auth 模拟器与 python 项目连接起来。 Actually, i want to create the users on emulator but when i create a user it is created on my real time firebase project
实际上,我想在模拟器上创建用户,但是当我创建一个用户时,它是在我的实时 firebase 项目上创建的
If anyone knows the solution please let me know it will be very grateful for me!如果有人知道解决方案,请告诉我,我将非常感激!
In case this helps someone else, this is how I managed to connect and use the auth emulator in python:如果这对其他人有帮助,这就是我在 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.