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

Incorrect encoding of base64 #3

Closed
ftruter opened this issue Jul 4, 2022 · 3 comments
Closed

Incorrect encoding of base64 #3

ftruter opened this issue Jul 4, 2022 · 3 comments

Comments

@ftruter
Copy link

ftruter commented Jul 4, 2022

WebAuthN spec refers to base64url encoding, not base64

AFAIK Vapor does not have methods to en/decode base64url yet, [but vapor/core does](Please see https://github.com/vapor/core/blob/main/Sources/Core/Data%2BBase64URL.swift)

What would it take to get support for base64url into Vapor/Vapor or into this project?

@ftruter
Copy link
Author

ftruter commented Jul 4, 2022

Without the proper en/decoding of client tokens this project generates 500 internal server errors now in all browsers that support WebAuthN

@0xTim
Copy link
Member

0xTim commented Jul 4, 2022

Yeah there's likely places I've misread the spec, I've noticed a few scenarios where it doesn't work and I get a 500 error.

In terms of where base64 URL encoding/decoding should live that will be in this package since the end result will be a library that's framework agnostic, so happy to accept a PR. (May or may not be related to #1)

@0xTim
Copy link
Member

0xTim commented Jul 25, 2022

Closed via #1

@0xTim 0xTim closed this as completed Jul 25, 2022
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

No branches or pull requests

2 participants