Yubico / php-u2flib-server

(OBSOLETE) U2F library in PHP
https://developers.yubico.com/php-u2flib-server/
BSD 2-Clause "Simplified" License
288 stars 68 forks source link

PDO example not working #63

Closed adriandelcl closed 6 years ago

adriandelcl commented 6 years ago

Hello, I am testing the PDO example with Google Chrome Version 67.0.3396.79 (Official Build) (64-bit) and Yubikey NEO.

When I click on Register button I always get the following error:

Register:  {version: "U2F_V2", challenge: "Zdd4xwVOidu7uhs72MP-vHBc4z-wkWG6EQAw30MYvGA", appId: "http://192.168.1.68"}

u2f-api.js:532 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('chrome-extension://kmendfapggjehodndflmmgagdbamhnfd') does not match the recipient window's origin ('null').
(anonymous) @ u2f-api.js:532
load (async)
u2f.getIframePort_ @ u2f-api.js:530
u2f.getMessagePort @ u2f-api.js:155
u2f.getPortSingleton_ @ u2f-api.js:584
u2f.register @ u2f-api.js:642
(anonymous) @ (index):11
setTimeout (async)
(anonymous) @ (index):9

Am I doing something wrong?

adriandelcl commented 6 years ago

I think my problem is that I am not using HTTPS.

Is it possible to run it on HTTP?

klali commented 6 years ago

See instructions in the README at https://github.com/google/u2f-ref-code for how to allow chrome to access http pages. Obviously this should not be attempted in production settings.