[5.x]: Passkey login doesn't work
What happened?
Description
Can't log in using passkey
Steps to reproduce
- Add apasskey to my user account.
- I use the keychain to do a thumbprint from my laptop. It works and gets added.
- Go into the CMS login screen and click "log in via passkey". I click it. It prompts me for my thumbnail. It says you will be signed into domain name via the passkey saved in email address
- It does not work.
Site is on Craft Cloud btw, but not sure if that matters.
Expected behavior
It should log me in.
Actual behavior
I don't get logged in.
Console log: Failed to load resource: the server responded with a status of 400 ()
https://atomicarcade.com/admin/actions/users/login-with-passkey?v=1721923669497 {"errorCode":"invalid_credentials","message":"Invalid username or password."}
Craft CMS version
5.2.8
PHP version
8.2.20
Operating system and version
Linux 5.10.219-229.866.amzn2.x86_64
Database type and version
MySQL 8.0.32
Image driver and version
GD 8.2.18
Installed plugins and versions
CKEditor - 4.1.0 Super Table - 4.0.1
- What browser + version are you using?
- What is your laptop’s make/model?
- Is the fingerprint scanner built-in, or an external peripheral?
I tried both the latest chrome and latest Safari right now Chrome: Version 126.0.6478.183 (Official Build) (arm64) Safari: Version 17.5 (19618.2.12.11.6) Mac: MacBook Pro, 14-inch, 2021, Apple M1 Max, OS Sonoma 14.5 (23F79)
I enter my email -- no password obviously -- click "sign in with a passkey" -- then I use the built in thumbprint button to authenticate. Its a button in the top right of the keyboard. The thumbprint button gives me a check like it worked (step 2), but it then doesn't work on the Craft CMS side and gives me those errors (step 3)
I've attached screen shots, obfuscating my email and the domain.
Step 1
Step 2
Step 3
Here is my user profile. It says "last used" this morning, but really it never got used. That's when I added it via keychain and it put my thumb and it worked. I kept the default title "Chome on Mac," which is the browser I was using when I added it.
So not Linux then 🙃
Just tested on Safari and was able to sign in successfully.
Couple things to try:
- Run
composer update - Enable the
safeModeconfig setting to rule out any plugin/module conflicts - Have your JavaScript console open and see if any JS errors / non-200 requests are occurring on the Login page throughout the process