Huz*_*een 5 email-validation ios firebase swift firebase-authentication
在 firebase 管理用户文档中,我找不到任何方法来压缩或缩短电子邮件验证链接的长度。功能运行良好,但从用户角度来看,此链接看起来又长又奇怪。我在互联网上搜索过但没有找到任何解决方案。下面是我的代码,请编码:
var actionCodeSettings = ActionCodeSettings.init()
actionCodeSettings.handleCodeInApp = false
let user = FirebaseAuthenticationHandler.shared.currentFirebaseUser
actionCodeSettings.url = URL.init(string: String(format: "https://example.firebaseapp.com/?verifyemail=%@", user.email!))
actionCodeSettings.setIOSBundleID(Bundle.main.bundleIdentifier!)
user.sendEmailVerification(with: actionCodeSettings, completion: { (error) in
if error != nil {
print("\(error?.localizedDescription)")
} else {
print("Verfication email sent")
}
Run Code Online (Sandbox Code Playgroud)
这是我收到的链接的屏幕截图:
| 归档时间: |
|
| 查看次数: |
460 次 |
| 最近记录: |