A
A
alex-ivannikov2021-12-22 20:34:20
macOS
alex-ivannikov, 2021-12-22 20:34:20

Can web authentication work cross-browser?

Adding Webauthn authentication for a website. Faced with the fact that TouchId on MacOs does not work cross-browser. If the authenticator was registered in Chrome, then I can log in only in Chrome. When I try to log in with TouchId in Safari, I get an error (found no credentials on this device). Conversely, if the authenticator was registered in Safari, then I can only log in to Safari, and I will get an error in Chrome.
To register an authenticator, I call navigator.credential.create(), with the following parameters:

{
  "rp": {
      "name": "localhost",
      "id": "localhost"
  },
  "user": {
      "id": Unit8Array,
      "name": "alex",
      "displayName": "alex"
  },
  "attestation": "none",
  "pubKeyCredParams": [
      {
          "type": "public-key",
          "alg": -7
      }
  ],
  "timeout": 60000,
  "authenticatorSelection": {
      "userVerification": "preferred",
      "requireResidentKey": false,
      "authenticatorAttachment": "platform"
  },
  "challenge": Unit8Array,
  "excludeCredentials": [
      {
          "type": "public-key",
          "id": Unit8Array
      }
  ],
  "status": "ok",
  "errorMessage": ""
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question