-
Notifications
You must be signed in to change notification settings - Fork 10
Safari breaks with TypeError when authenticatorAttachment is null #34
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
Comments
Hi @tomsommer, Do you use the Symfony Bundle with custom option handlers or the library? |
I don't use any bundle, I just do |
OK, then can you try using the context options: use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;
(new WebauthnSerializerFactory(AttestationStatementSupportManager::create()))->create()->serialize(.... ,'json', [AbstractObjectNormalizer::SKIP_NULL_VALUES => true]) |
This solves it. I would suggest this be the default then, since it will not produce valid output otherwise :) Or at least note it somewhere in the docs, so other people won't hit the same issue. |
👍Perfect. Many thanks for the confirmation. |
When setting
AUTHENTICATOR_ATTACHMENT_NO_PREFERENCE
authenticatorAttachment
becomesnull
in the serialized output. Safari breaks with aTypeError
if this happens.authenticatorAttachment
should instead be removed from the output,null
is not a valid value, according to Safari.The text was updated successfully, but these errors were encountered: