-
Notifications
You must be signed in to change notification settings - Fork 166
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
generate_user_handle()
produce value will exceed length 64 limit after serialize by options_to_json
.
#199
Comments
options_to_json
.generate_user_handle()
produce value will exceed length 64 limit after serialize by options_to_json
.
The use of base64url here is just to make it easy to get those bytes from the front end to the back end. You'll need to base64url-decode |
ok thanks for explanation |
I had the same problem. My solution is to write my own generate_user_handle() that returns 45 bytes instead.
then use that when calling generate_registration_options(), like this
|
@rimu Your issue is related to the fact that @simplewebauthn/browser is treating the base64url-encoded |
According to spec user_id should not exceed 64 bytes
Reproduce
I use version
2.0.0
the result will be
the value
user.id
iso30OjWUT0hV3jArDj_8u4uh6wzHJJ75K0DnUtXtot2OoJROZ_svHiHZZGml7rW-vW2CfVYxVpdn5kBOuX1hY2Q
and it's over 64 bytes.Expected result
the value of
user.id
should be with in 64bytes and I should able to pass the result to client.The text was updated successfully, but these errors were encountered: