laravel-webauthn
laravel-webauthn copied to clipboard
Getting "Error during the validation of the key". how do i debug this?
I have implemented the solution using jquery. I have followed the test app that is provided with the readme.
here's my code:
window.webauthn = new WebAuthn((name, message) => {
console.log({name, message});
});
$("#add-webauth").click(function(){
$.post(route('webauthn.store.options'), {}).done(({publicKey}) => {
console.log("publicKey", publicKey);
window.webauthn.register(
publicKey,
(data) => {
const payload = {
...data,
name:`${device.brand} ${os.name} on ${client.name}`,
};
console.log("DATA", {payload});
$.post(route('webauthn.store'), payload).done(resp => console.log("STORE", {resp}));
}
);
});
});
{"message":"The given data was invalid.","errors":{"email":["Error during the validation of the key"]}}
Please help!
Did you look at the browser debug tool and/or network logs? Especially the POST raw return?
Did you solve this?
My Error
{"message":"Error during the validation of the key","errors":{"email":["Error during the validation of the key"]}}
@ssgnoe, Our team ended up abandoning the feature for the client since it's too much hassle and we might be incompetent. The thing is it works on the example laravel @asbiin provided, so it must be something we did that caused this. There's a very little debugging..
I urge @asbiin to utilize laravel logging. So that we can debug this. You may also add logging switch in the config file or check if the app has debugging mode enabled.
I cant really suggest anything, other than start with @asbiin 's provided laravel example, build your app off of it. Good luck!
@safjammed Hey, Thanks for your help. Unfortunately the demo Repository also doesn't work on my system.
On generating key I get an error
I'm not getting the error. useForm().post(route('webauthn.store.options'))
is sending the request, so why the browser sends it as a get request?
{"message":"The given data was invalid.","errors":{"email":["Error during the validation of the key"]}}
I'm getting this error too if i set attestation_conveyance
in the config to indirect/direct/enterprise. If i set it to none (default), it works.
I highly recommand you to switch to @simplewebauthn/browser
which is supported and maintained. It's a better solution as asbiin/laravel-webauthn
is not a frontend package.