Getting the error while logging into an iframe through webauthn.
The 'publickey-credentials-get' feature is not enabled in this document. Permissions Policy may be used to delegate Web Authentication capabilities to cross-origin child frames.
Here is the link to the example https://jsfiddle.net/14kj25nr/. I have registered a user "test_account" directly through webauthn.io and then tried to login into it through jsfiddle. It says to use publickey-credentials-get
, but I couldn't find a way to use it to get it to work. Any help would be appreciated.
Update 1:
I have added the allow attribute for the iframe allow="publickey-credentials-get"
. It still gives me the same error. The example in the fiddle is updated.
Update 2:
From IAmKale's suggestion. I made the following changes but still got the same error.
Updated the allow attribute of iframe allow="publickey-credentials-get *"
.
I use the Requestly
chrome extension to add the Permissions-Policy
header in the RP's response. It can be seen in the below screenshot that I was able to successfully add the header in the response. But still getting the same error. Could it be some jsfiddle
specific issue? Or is there anything I am doing wrong? I am using Chrome Version 96.0.4664.110.
Update 3:
When I use the iframe in localhost instead of jsfiddle, I am getting webauthn chrom pop-up. But the log-in is still unsuccessful, the server returns POST https://webauthn.io/assertion 400
.