ios - firebase 忘记密码用法

标签 ios swift firebase

您好,我开始成为这里的常客,但如果有任何人可以帮助我解决以下问题。我想测试看看用户是否正在使用重置密码并具有以下内容:

if FIREBASE_REF.authData.providerData["isTemporaryPassword"] == true {
// run some code                
    }

但是 xcode 说的是预期的表达式,如果有人知道正确的语法,我将不胜感激。

谢谢

最佳答案

我想我现在已经解决了,解决方案如下,适用于正在为此苦苦挣扎的其他人:

let handle = FIREBASE_REF.authData.providerData["isTemporaryPassword"] as? Bool

            if  (handle == true) {

            // run code here.

            }

关于ios - firebase 忘记密码用法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36289931/

相关文章:

ios - 向 UITextView 添加手势会取消默认行为

javascript - Firebase 警告 : Using an unspecified index. 考虑添加 ".indexOn": "Keyboards"在/到您的安全规则以获得更好的性能

javascript - firebase云函数无法读取未定义的属性 'ref'

Swift guard 让错误 : Initializer for conditional binding must have Optional type, 在 swift 中不是 '[String : String]'?

ios - Swift tableview numberOfRowsInSection 返回 nil fatal error 可选值

javascript - 如何在 vue js 中将从 firebase 检索到的数据显示到标题标记 <h1>{{ }}</h1> ?

ios - Instagram 照片到 UIImageView

ios - 如何绘制围绕特定点旋转的 NSAttributedString?

ios - 在 binutils 中运行 objdump 时无法识别文件格式

ios - 如何在 iOS UItest 中选择本地化的日期选择器项目