ios - Swift - Firebase - 身份验证电子邮件无密码

标签 ios swift firebase firebase-authentication

我正在尝试使用 Firebase (Swift) 进行电子邮件/无密码身份验证

https://firebase.google.com/docs/auth/ios/email-link-auth

在文档中,他们提到了这个设置:

let actionCodeSettings = ActionCodeSettings()
actionCodeSettings.url = URL(string: "https://www.example.com")
// The sign-in operation has to always be completed in the app.
actionCodeSettings.handleCodeInApp = true
actionCodeSettings.setIOSBundleID(Bundle.main.bundleIdentifier!)
actionCodeSettings.setAndroidPackageName("com.example.android",
                                         installIfNotAvailable: false, minimumVersion: "12")

我不明白

中的 URL 是什么
actionCodeSettings.url = URL(string: "https://www.example.com")

我必须在这个 URL 上放什么? AndroidPackageName 也让我感到困惑。是可以删除的吧?

感谢您的帮助!

最佳答案

Firebase Auth 使用 Firebase dynamic links (FDL) 将电子邮件链接 OTP 传回应用程序。 FDL 用于网络到移动设备的重定向。 FDL 链接的关键部分是其中的深层链接(构建 FDL 链接时需要)。如果链接是从安装了目标移动应用程序的设备或非移动设备(笔记本电脑/台式机等)触发的,则该链接将用作后备。此链接对于将任何其他状态传递回登录页面也很有用。在这种情况下,它将用作将代码传回应用程序或后备网页的机制。

关于ios - Swift - Firebase - 身份验证电子邮件无密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50637978/

相关文章:

ios - Swift - 按下 BarButtonItem 时以编程方式创建和显示 UIPickerView

ios - Alamofire 在 Mac OS 命令行应用程序中返回空响应

ios - UITableView 部分中的 NSDates 不反射(reflect)来自 UIDatePicker 的日期

ios - Google Cast iOS SDK 4.4.4 - 无设备发现

ios - 在编辑模式下使用不同的表格 View 单元格

ios - Firebase:Xcode 无法找到配置文件: 'GoogleService-Info.plist'

android - Firebase 真实数据库 - 查询多个标签(可能在数组中)

firebase - Flutter:取消 Google 登录流程时出现平台异常

ios - Swift - 调整图像大小 iMessage 应用程序

ios - 由于间隙,AVPlayer 流在后台停止