Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Passkey login doesn't work #15416

Open
matthewstick opened this issue Jul 25, 2024 · 3 comments
Open

[5.x]: Passkey login doesn't work #15416

matthewstick opened this issue Jul 25, 2024 · 3 comments
Labels

Comments

@matthewstick
Copy link

What happened?

Description

Can't log in using passkey

Steps to reproduce

  1. Add apasskey to my user account.
  2. I use the keychain to do a thumbprint from my laptop. It works and gets added.
  3. 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
  4. 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

@brandonkelly
Copy link
Member

  • What browser + version are you using?
  • What is your laptop’s make/model?
  • Is the fingerprint scanner built-in, or an external peripheral?

@matthewstick
Copy link
Author

matthewstick commented Jul 26, 2024

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
v1

Step 2
v2

Step 3
v3

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.
image

@brandonkelly
Copy link
Member

So not Linux then 🙃

Just tested on Safari and was able to sign in successfully.

Couple things to try:

  • Run composer update
  • Enable the safeMode config 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants