我正在尝试在安卓系统上实现FIDO2。我已经在我的域名上托管了assetlinks.json (对不起,我不想要,也不确定我是否被允许透露整个url )。我定义了assets_statements字符串并将其添加到我的清单中,我还实现了整个get注册挑战逻辑,其中我从PublicKeyCredentialCreateOptions创建了一个挂起的意图。在我启动intent之后,我看到一个白色的屏幕,它显示和关闭得非常快,没有任何描述性错误或任何东西,我不知道如何调试这个问题。日志显示:
ActivityTaskManager: Displayed com.google.android.gms/.fido.fido2.ui.Fido2FullScreenActivity
E/Fido: [DigitalAssetsAssociationChecker] JSON Object doesn't have linked key
E/Fido: [Fido2RequestController] The incoming request cannot be validated
E/Fido: [Fido2RequestController] The incoming request cannot be validated在https://developers.google.com/digital-asset-links/tools/generator上,它说我的域名授权应用程序深度链接到我的包名。
我正在使用com.google.android.gms:play-services-fido:18.1.0
日志中的错误在任何方面都没有任何帮助,我不确定我是否仍然遗漏了一些东西,任何帮助都将不胜感激。
发布于 2021-08-03 18:31:29
好的,我通过使用示例应用程序https://github.com/googlecodelabs/fido2-codelab并改变周围的东西来解决这个问题,所以我将回答我自己的问题。请求注册质询时,RP.id字段需要与您的域名相同。在示例中,Rp.id的值是"webauthn-codelab.glitch.me",我将其更改为"webauthn.glitch.me“只是为了试验一下会发生什么。猜猜发生了什么,我得到了和以前一样的错误:
E/Fido: [DigitalAssetsAssociationChecker] JSON Object doesn't have linked key
E/Fido: [Fido2RequestController] The incoming request cannot be validated
E/Fido: [Fido2RequestController] The incoming request cannot be validated最后,确保get从后端返回的RP.id与域url匹配。这里还有一个解释RP id的链接:https://www.w3.org/TR/webauthn-2/#relying-party-identifier
https://stackoverflow.com/questions/68639655
复制相似问题