Fixed exception raised in as_credential_descriptors() when testing for valid AuthenticatorTransport enum values. #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This resolves #5
Prior to python 3.12 trying to use
"foo" in SomeEnum
raises an exception. This was added in 3.12.Since trying to access an enum member using
SomeEnum("a_value")
raises aValueError
when that is not a valid value but returns the enum member when it exists, I have updatedmodels.as_credential_descriptors()
to just directly try to appendAuthenticatorTransport(t)
to the list of transports in a try/except block and pass on aValueError
.With the way the code has been re-organized it looks like the problem code may only get called when registering a passkey on the current main branch rather than when logging in as it does with version 0.1.2 on pypi.
After making this change I can both register a passkey and log in with the created passkey on the main branch code on python 3.11 and 3.12.