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

Avoid Double Encoding #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joel
Copy link

@joel joel commented Nov 29, 2024

This PR is more of a question because I can't figure out how you make it work.

When creating a challenge, you call the controller action

Started POST "/passkeys/challenge"

Screenshot 2024-11-29 at 15 54 50

Link

For a registration BeginChallenge, call BeginRegistration.

Screenshot 2024-11-29 at 16 01 59

Link

The WebAuthn::PublicKeyCredential::Options creates the challenge:

Screenshot 2024-11-29 at 16 02 35

Link

and that challenge is returned encoded:

Screenshot 2024-11-29 at 16 03 59

Link

So why do re-encode it?

Screenshot 2024-11-29 at 16 04 49

Link

Removing the double encoding makes it work for me. I can provide a Rails 8 app example.

@joel
Copy link
Author

joel commented Nov 29, 2024

The app (Really rough scaffold)

@feralbob
Copy link
Contributor

Hrm... I don't know why it's currently double encoded. I had it working on my test app just fine in this state. Are you saying that it doesn't work if you don't remove the double encoding.

I'll have a look at your example and see if I can replicate.

@joel
Copy link
Author

joel commented Dec 12, 2024

Are you saying it doesn't work if you don't remove the double encoding?

That is precisely what I'm saying
thank you for having a look

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

Successfully merging this pull request may close these issues.

2 participants