Safari breaks with TypeError when authenticatorAttachment is null
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- php
- Domain
- documentation
Research direction
Read the authenticator registration page, especially its creation request section. The original thread says the serializer context option AbstractObjectNormalizer::SKIP_NULL_VALUES => true already solves the issue and that the option needs clearer documentation. Done means the relevant documentation explains this option to users who serialize options with the library.
Written by the indexing model from the issue text.
Description
When setting AUTHENTICATOR_ATTACHMENT_NO_PREFERENCE authenticatorAttachment becomes null in the serialized output. Safari breaks with a TypeError if this happens. authenticatorAttachment should instead be removed from the output, null is not a valid value, according to Safari.
From the original thread
Spomky — 2025-01-08
Hi @tomsommer,
Do you use the Symfony Bundle with custom option handlers or the library?
Normally,nullvalues are not in the serialized options. See DefaultCreationOptionsHandler.php#L29 or DefaultRequestOptionsHandler.php#L29
tomsommer — 2025-01-08
I don't use any bundle, I just do
(new WebauthnSerializerFactory(AttestationStatementSupportManager::create()))->create()->serialize(.... ,'json')
Spomky — 2025-01-08
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])
tomsommer — 2025-01-08
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.
Spomky — 2025-01-08
👍Perfect. Many thanks for the confirmation.
This context argument is used in the documentation, but not highlighted as it should be.
I move this issue to the doc repository and will update some pages.
Copied from web-auth/doc#34, opened by @tomsommer on 2025-01-08. The documentations of Slabs now share one site and one repository, and the former one is being retired — nothing was lost, and this is where the thread continues.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 34m
- Merged PRs (30d)
- 40
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Spomky-Labs/docs
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Spomky-Labs/docs#27 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 67/100
Spomky-Labs/docs#26 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 74/100
Spomky-Labs/docs#25 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Spomky-Labs/docs#23 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Spomky-Labs/docs#22 ·
Maintainers usually reply within 1 day
All issues in Spomky-Labs/docs
Similar issues
-
backend enhancement priority:P3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
geolens-io/geolens#4161 ·
Maintainers usually reply within 1 day
-
pkg:clai2
Difficulty 1/5 Under an hour Newbie friendliness 75/100
pydantic/pydantic-ai#14845 ·
Maintainers usually reply within 1 day
-
Add a languageOpengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
LearningCircuit/local-deep-research#9272 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
patrickballard/wheelgap#783 ·