【问题标题】:Disable user account after firebase authentication time period在 Firebase 身份验证时间段后禁用用户帐户
【发布时间】:2021-12-12 05:21:30
【问题描述】:

我想设置一个自动停用用户的时间段。示例:7 天后禁用用户 x 或者使用默认禁用 true 注册用户的方法

我目前正在使用 pyrebase 和 pyqt5 以这种方式注册

def register(self, screen):
        email = screen.email.text()
        password = screen.password.text()
        confirmpass = screen.confirmpass.text()
        if password == confirmpass:
            try:
                self.auth.create_user_with_email_and_password(email, password)
                self.msg_error_registro(screen, msg="Registration successful", bgcolor="background-color:rgb(85, 255, 127);")
                screen.email.setText("")
                screen.password.setText("")
                screen.confirmpass.setText("")
            except requests.exceptions.HTTPError as httpErr:
                self.error_message = json.loads(httpErr.args[1])['error']['message']

【问题讨论】:

    标签: python firebase-authentication firebase-admin pyrebase


    【解决方案1】:

    Firebase 身份验证中没有内置任何功能可以在一定时间后自动禁用帐户。我也没有在 Pyrebase 中看到设置用户帐户的禁用标志的调用,尽管通过 Pyrebase 包装的 REST API 当然可以这样做。

    您是否考虑过使用 Firebase Admin SDK for Python,它支持 disabling accounts 和更多操作?

    【讨论】:

      猜你喜欢
      • 2021-12-04
      • 1970-01-01
      • 2017-08-25
      • 1970-01-01
      • 2021-05-24
      • 2021-07-28
      • 1970-01-01
      • 1970-01-01
      • 2021-07-31
      相关资源
      最近更新 更多