Comments (9)
It looks like if the users directory is empty and you try to "log in" before registering, the example code gets this error. I'll fix this shortly by producing a more meaningful error message, but you would normally want to register before trying to "log in" - if there are no registrations, attempts to log in will inevitably fail.
from webauthn.
Thanks for your quick answer!
I have already tried using User Registration before. Sadly, the error message is couldn't initiate registration: SyntaxError: Unexpected token < in JSON at position 1
When i try to log in before regristering i have: couldn't initiate login: SyntaxError: Unexpected token < in JSON at position 1
I feel like I can not register :-(
from webauthn.
from webauthn.
Sorry, I didn't look closely enough at the error previously. So the problem is index.php is not in your document root, so when the Ajax callback happens it returns the default Apache server page rather than the JSON.
The example assumes this is on a dedicated (virtual) host so you should be able to find index.php in http://35.190.191.90/ along with the whole webauthn directory as checked out from github, and CBOREncode as checked out from github. Rather than copy webauthn/example/index.php up two levels, I suggest you link to it if your Apache setup allows links, or if not put an index.php in the top level which includes the one in example.
If http://35.190.191.90/ can't be dedicated to webauthn, you'll need to change the includes at the top of example, to be where you put the files, as $_SERVER['DOCUMENT_ROOT'] assumes it is at the top level.
So if, for example, you put it in "mywebauthn" and your document root is /var/www, then you'd have
/var/www/mywebauthn
index.php [link to index.php below]
webauthn
src
...
example
index.php
CBOREncode
...
and change the four includes in index.php to add the mywebauthn directory after $_SERVER['DOCUMENT_ROOT'].'
I have checked that an install from scratch still works, and it does. I also just checked in a change to index.php to be clearer about where .users is if it can't be created, though this is not your initial problem.
from webauthn.
By the way, I know this is just as an example, but it is really rather pointless if you don't use https (you can get free certificates from LetsEncrypt), and you have left Indexes on on your Apache setup so all the files are readable externally including the .users directory. .users would ideally be elsewhere anyway. You certainly don't want a live version to do this!
from webauthn.
Hello!
Sorry, I really forgot to answer you. It's work fine !!!
I really enjoyed your help !!!
Rémi
from webauthn.
I got the webauthn result written into each fingerprint images exif copyright tag...
CopyrightNotice Copyright /a-finger/img/6865f27ef75723939f37d9da83cc6c55 The GDK Group
from webauthn.
Sorry @geraldkrug, I have no idea what you mean, and I don't see what it has to do with this issue. Please can you elucidate, in a new issue if that's what it is.
from webauthn.
Thank you @remivern . Closing this now.
from webauthn.
Related Issues (20)
- Dissallow reusing login payloads HOT 1
- importing the library HOT 2
- Icon in rp
- Bio-metric Authentication HOT 12
- Trim unnecessary stuff HOT 2
- Timeout not implemented? HOT 2
- iphone safari browser is not working HOT 8
- Windows + FIDO + Securitykey return fmt as packed in the attestationobject
- `composer require` fails with InvalidArgumentException HOT 2
- Firefox has started returning an error on registration HOT 1
- Safari: registration failed: Bad Request: cannot decode key response (5) HOT 3
- Setting unknown property: appid for local host HOT 5
- 500 / Couldn't initiate registration HOT 2
- phpseclib3 HOT 4
- Multiple Keys per user HOT 3
- couldn't initiate login: SyntaxError: Unexpected end of JSON input: HOT 2
- Add support for discoverable credentials (passkeys) HOT 1
- problem authenticating - abort HOT 5
- aaguid empty HOT 10
- Android 9 fails to offer choice of finger print HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webauthn.