2

I am testing a very simple webauthn example written with go from https://github.com/hbolimovsky/webauthn-example and it works very well when I build it for the host machine. I am using MacOS Big Sur with Chrome 91. However, if I build the example for an arm7/linux machine, I am getting "browser not supported" error message.

Clearly the browser is supported since it works on the host machine. The code that checks for browser support is this

// check whether current browser supports WebAuthn
if (!window.PublicKeyCredential) {
     alert("Error: this browser does not support WebAuthn");
     return;
   }

The cross compiled machine doesn't have internet access though I am highly doubtful that that is the reason. What can be the reason for this?

I am accessing the cross compiled machine through it's IP address. Can that be the reason? To test this I accessed it through it's bonjour name and that didn't make a difference.

Umut
  • 2,317
  • 1
  • 17
  • 19

1 Answers1

5

How do you access your linux/arm machine with your browser? WebAuthn only works in a secure context, http://localhost or https://anywhereelse that is...

Jan Gerle
  • 196
  • 2
  • 1
    Thank you. That might be the reason. The simple example is a server on http. I will try to set up https. – Umut Jun 18 '21 at 08:06
  • I've filed a pull request in the original code to help detect that situation https://github.com/hbolimovsky/webauthn-example/pull/3 – dontcallmedom Jun 18 '21 at 09:55
  • Sure enough, that was the reason. I passed the warning but I cannot register a user. Are there any other limitations regarding certificate? I am using self signed root certificate with RSA – Umut Jun 18 '21 at 13:32
  • I tried elliptic curve but that didn't make a difference – Umut Jun 18 '21 at 13:37
  • Seems like webauthn doesn't like self signed certificate with IP address as the CN name. – Umut Jun 19 '21 at 20:24