firebase - signWithCustomMethod 错误 [无效的断言格式。需要 3 个点分隔段。]
问题描述
firebase.auth().signInwithCustomToken().then().catch()
它由 3 个点分隔。我应该在 signInwithCustomToken() 方法的参数中传递什么?id 或一些令牌?PScreateCustomToken() 已弃用,因此我直接使用 signInWithCustomMethod 。此外,我仍在使用免费版本,即在 firebase 控制台中未启用计费。
解决方案
只需以AuthProviderToken
这种方式将字符串标记转换为:
if let credential = AccessToken.current?.tokenString { //String Token unwrapped
let authCredential = FacebookAuthProvider.credential(withAccessToken: credential) // Auth Credential
...
快乐编码!
推荐阅读
- python - 我在哪里可以找到 Cloud Run docker 实例中的 python 打印语句?
- java - 10 秒后显示推送通知
- reactjs - 用于降价内容的 NextJS Image-Component?
- c# - 如何在基于 C# 的 Windows 服务中处理以不同时间间隔并行运行的多个任务?
- rest - 使用适用于 WLS 的 WebLogic RESTful 管理界面处理具有归档版本的应用程序
- javascript - 如何将 ECMAScript 12 转换为 ECMAScript 10
- typescript - 使用泛型实现和扩展接口
- visual-studio-code - 我可以在扩展程序中以编程方式触发代码片段吗?
- python - Python SQL 查询到 PBI
- google-cloud-platform - Cloud Scheduler 随机性