Comments (2)
You aren't giving much to go on. The error message is straightforward: a string being passed into json_decode is not valid JSON. What platform are you on (server and client)? What kind of key is it? What is the string that's causing the problem and where in the code? Have you changed the code in any way?
There are two json_decode calls during registration, one near the top of WebAuthn::register where it decodes the information provided by the key, and the other near the end of that function where it decodes the other parameter, the user's existing keys. You should have a line number for which one it was, and I would put some logging just before the relevant call to find out what the string is that is being passed in, the one it is complaining about.
If you haven't changed the code at all, chances are it is the first one, as the second one is only used on registration of additional keys, and the example doesn't allow for adding a key to an existing user. Which rather suggests that what should be passed into the json_decode call is being corrupted somewhere.
Once you've established where the problem is and what the problem string is, if it is indeed the first call, then I'd look at the network request in the browser debugger, to see what is actually being sent. If that's the same as the string that's causing the problem, then the problem is on the client side; and if not it is on the server side, so we'll know where to look next.
from webauthn.
You might also want to check permission where the code writes the user database. If it can't write to that, it will inevitably fail.
from webauthn.
Related Issues (20)
- TypeError: Element of 'transports' member of PublicKeyCredentialDescriptor 'internal' is not a valid value for enumeration AuthenticatorTransport.
- register each yubikey only once HOT 2
- 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
- Add support for discoverable credentials (passkeys) HOT 1
- problem authenticating - abort HOT 5
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.