identity-samples icon indicating copy to clipboard operation
identity-samples copied to clipboard

createCredential() method returns error in CredentialManager

Open grvgoel81 opened this issue 1 year ago • 1 comments

I tried to follow Android Passkey codelab steps. I'm consistently encountering an exception error while attempting to sign up for a passkey : The incoming request cannot be validated

The asset links looks like this generated using(https://developers.google.com/digital-asset-links/tools/generator):

[
  {
    "relation": [
      "delegate_permission/common.handle_all_urls"
    ],
    "target": {
      "namespace": "android_app",
      "package_name": "${applicationPackageName}",
      "sha256_cert_fingerprints": [
        "${SHA256_CERT_FINGERPRINT}"
      ]
    }
  }
]

Added a strings.xml file:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="asset_statements" translatable="false">
  [{
    \"https://${ourSiteDomain}/.well-known/assetlinks.json\"
  }]
  </string>
</resources>

Even added meta-data to the manifest.xml:

<meta-data android:name="asset_statements" android:resource="@string/asset_statements" />

I've tried to find the answers for days, any help would be appreciated from Google team. Thanks in advance.

grvgoel81 avatar Jul 11 '24 03:07 grvgoel81

@grvgoel81 is there any solution for this issue?

masheransari avatar Aug 22 '24 08:08 masheransari

Hey this issue always come when the asset linking is not correct. Can you try out our sample and see if that is working. You need to add proper package name and SHA1 on your asset linking file on server/website/domain.

Once you check this, would you mind creating a bug with all details required in that template if this still exisits? Sharing here : https://issuetracker.google.com/issues/new?component=1301097&template=1773864

Closing from here, please feel free to file the bug after validating and lets track there. If there is anythign else please feel free to reopen.

niharika2810 avatar Aug 30 '24 06:08 niharika2810