Laragear / WebAuthn

Authenticate users with Passkeys: fingerprints, patterns and biometric data.
MIT License
305 stars 37 forks source link

Attestation Error: Challenge does not exist. #81

Closed niyazialpay closed 6 months ago

niyazialpay commented 6 months ago

PHP & Platform

PHP 8.3 - Ubuntu 22.04

Database

Mysql 8

Laravel version

11

Have you done this?

Expectation

Attestation Error: Challenge does not exist.

Description

I did everything exactly as you described in the installation steps. In Laravel 10 I installed version 1.x of this package without any problems, but in Laravel 11 and Webauthn 2.x I get the following error.

Attestation Error: Challenge does not exist.

Reproduction

//

Stack trace & logs

No response

niyazialpay commented 6 months ago

Ok, I solved the problem, sorry

DarkGhostHunter commented 6 months ago

What was it? I guess the session was not initialized.

niyazialpay commented 5 months ago

It seemed like the problem was related to JavaScript. I don't remember what I changed, but I did something and it got fixed. However, even though I didn't do anything afterwards (it was working fine for about a week), now it's not working again without any changes in JavaScript. I receive a success message indicating that the passkey registration was successful, and the necessary records are also created in the database, but during the login process, it doesn't recognize the passkey. Bitwarden, Yubikey, iPhone face recognition are not working. Only Windows Hello face recognition is working. I think this issue might be related to the JavaScript code.

For registration const attest = async () => await Webpass.attest("{{route('webauthn.register.options')}}", "{{route('webauthn.register')}}");

For login const assert = async () => await Webpass.assert("{{route('webauthn.login.options')}}", "{{route('webauthn.login')}}");

DarkGhostHunter commented 5 months ago

Make an issue on Webpass, or use credentials directly to debug what's happening.