android - 验证电子邮件提供的 API 密钥在 Android 上已过期
问题描述
我正在使用此代码发送带有自定义 dynamicLinkDomain 的验证电子邮件links.myapp.com
。
final acs = ActionCodeSettings(
url: 'https://myapp.com/finishLogin',
handleCodeInApp: true,
iOSBundleId: 'com.myapp.mobileApp',
androidPackageName: 'com.myapp.mobileApp',
androidInstallApp: true,
androidMinimumVersion: '18',
dynamicLinkDomain: 'links.myapp.com',
);
await SecureStorageService.to.postEmail(email);
await FirebaseService.to.auth.sendSignInLinkToEmail(
email: email,
actionCodeSettings: acs,
);
该 dynamicLinkDomain 设置正确,因为我在 Android 和 iOS 的应用程序中都使用它。但是当我点击 Android 设备(模拟器或真实设备)上的登录链接时,我总是收到 400 API key expired 错误
我试过了
- 清理项目
flutter clean
- 无限制地创建新的 API 密钥
但我仍然得到错误。这似乎是一个动态链接问题,但我无法发现它。有人有想法吗?
我可以看到我在电子邮件中的内容非常不同,这取决于我是否从 iOS 生成电子邮件
https://links.myapp.com/?link=https://links.myapp..com/__/auth/action?apiKey%3DAIzaS...NedNY%26mode%3DsignIn%26oobCode%3DKI4NK...F4ao-7yw%26continueUrl%3Dhttps://myapp..com/finishLogin%26lang%3Den&ibi=com.myapp..mobileApp&ifl=https://links.myapp..com/__/auth/action?apiKey%3DAIza...tNedNY%26mode%3DsignIn%26oobCode%3DKI...-7yw%26continueUrl%3Dhttps://myapp..com/finishLogin%26lang%3Den
或安卓
https://links.myapp.com/__/auth/action?apiKey=AIza...edNY&mode=signIn&oobCode=XQI...2pCw&continueUrl=https://myapp.com/finishLogin&lang=en
这正常吗?
解决方案
推荐阅读
- php - 没有 ical 事件的电子邮件
- oauth-2.0 - 我们不能使用 SAML 来保护微服务吗?
- php - 在 Entrust 和 Laravel 5.6 注册时添加默认角色
- node.js - 如何使用节点 js 访问具有 ACL 私有的 s3 文件
- hyperledger-fabric - HistorianRecord 是如何工作的?我想根据资产 ID 保存所有交易的历史记录
- ios - ImagePicker 在 Angular 6 微应用中选择图像后关闭到黑屏
- apache-kafka - Kafka Connect:“此工作人员中已存在任务”
- android - 不使用 AWS SDK 登录到 android 应用程序
- javascript - Node.js - Modify node_module content
- java - 在 IntelliJ 中的 JavaFx 中使用 java EventFilters 时,似乎只是添加了 EventFilters 而没有在场景中删除它们?