0

I'm trying to show the registration response from a Fido U2F token on an alert (Google chrome V41) like so:

<script src="/u2f-api.js"></script>
<script>
var challenge = {
        version : "U2F_V2",
        challenge : "YXJlIHlvdSBib3JlZD8gOy0p",
        appId : "/index.html",
        sessionId : "26"
    };

u2f.sign([challenge], [],
  function(deviceResponse) {
    alert(JSON.stringify(deviceResponse));
  }
);
</script>

but for some reason this code doesn't work correctly. I don't see the alert even after clicking on the token button.

Robby Cornelissen
  • 91,784
  • 22
  • 134
  • 156
Abdessamad Doughri
  • 1,324
  • 2
  • 16
  • 29

1 Answers1

2

I've resolved this I forgot the " . " in u2f-api.js url

<script src="./u2f-api.js"></script>
Abdessamad Doughri
  • 1,324
  • 2
  • 16
  • 29