Gaurav Goel
Gaurav Goel

Reputation: 21

Android CredentialManager: createCredential() method returns error in CredentialManager

I'm testing the abilities of the Android Credential Manager APIs to work with passkeys over W3C standards. While everything is set up according to documentation. I am getting error everytime in createCredential() method:

androidx.credentials.exceptions.domerrors.SecurityError@24b5e49 createPasskey failed with exception: The incoming request cannot be validated

Generated assestslink.json using https://developers.google.com/digital-asset-links/tools/generator and hosted to our server. But error everytime "The incoming request cannot be validated"

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

Upvotes: 1

Views: 315

Answers (2)

Field
Field

Reputation: 1

You need to also make sure to include the delegate_permission/common.get_login_creds relation in the JSON file, which doesn't seem to be included automatically by that asset link generator.

More details on https://developer.android.com/identity/sign-in/credential-manager#add-support-dal

Upvotes: 0

Michael Braga
Michael Braga

Reputation: 46

Without any other information presented try the following:

  • make sure your hosted server is under https
  • For basic implementation, make sure your rp.id value is under the domain of your hosted server. For example, if you have your assestslink.json file hosted at https://example.com your rp.id value should be example.com

Upvotes: 0

Related Questions