最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - webauthn example indicates browser is not supported when cross compiled but works on host machine - Stack Overflow

matteradmin6PV0评论

I am testing a very simple webauthn example written with go from 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 piled 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 piled 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.

I am testing a very simple webauthn example written with go from https://github./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 piled 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 piled 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.

Share Improve this question edited Jun 18, 2021 at 7:27 Umut asked Jun 18, 2021 at 7:03 UmutUmut 2,5273 gold badges21 silver badges20 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

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...

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far