使用Python的Firebase Auth

时间:2020-04-09 18:29:21

标签: python firebase firebase-authentication

我需要检查电子邮件地址是否已在Firebase中注册。我将它们存储在一个元组中并正确遍历所有值,调用函数

auth.get_user_by_email

但是我无法管理答案来确定哪个地址存在,哪个地址不存在

你能帮我吗?找到有效地址后,我需要退出一会儿,但不能退出。它疯狂地运行直到X溢出... 我的代码是这样的:

num_mails=usuario.count(",") + 1

    if num_mails > 1: 
        mails=usuario.split(',')
        x=0
        while x < num_mails:
            try:
                respuesta=auth.get_user_by_email(mails[x])
                break
            except:
                print("probamos otro\n")
                x=x+1

print("HA pasado con "+mails[x])

0 个答案:

没有答案