【问题标题】:Checking the state of Parse email verification from swift从 swift 检查 Parse 电子邮件验证的状态
【发布时间】:2015-12-11 13:10:36
【问题描述】:

parse 将电子邮件发送到输入的电子邮件地址后,我如何检查该电子邮件地址是否已在 swift 中验证,然后才允许用户登录应用程序?谢谢!

【问题讨论】:

    标签: swift email parse-platform verification


    【解决方案1】:

    解析User 对象,具有字段emailVerified。因此,当用户登录应用程序时,您可以检查它:

    PFUser.logInWithUsernameInBackground(email, password: password) { (user, error) in
    
      if error == nil{
        if let verified = user["emailVerified"] as? Bool{
          if verified == true{
           // log in
          }else{
           // show that email isn't verified
          }
        }else{
          // show that email isn't verified
        }
      }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-06-07
      • 2018-04-15
      • 2020-06-06
      • 1970-01-01
      • 2016-10-23
      • 2018-12-25
      • 1970-01-01
      相关资源
      最近更新 更多