Clarifications about userHandle computation in FinishAssertionSteps class #243
-
Hi, I am facing a problem with the userHandle computation during the assertion verification. But before entering into the details of my specific problem, there are two things I would like to clarify about the
Now I can finally explain why I am asking all this. We use FIDO2 as a second factor authentication, and it seems to work as desired on Windows machines. On MAC OS machines though, authentication fails (registration works fine). For some reasons (maybe linked to Yubico/libfido2#464 ?), So now (relating to point 2 above): Should this sitaution by handled by the If yes, is it correct to say that the library must be patched ?
This problem here is based on a lot of "what if?", I hope I made it clear enough ! Thanks a lot for your answers, Cyril |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi!
Does that help? |
Beta Was this translation helpful? Give feedback.
Hi!
This is a work-around to the fact that unlike
scala.Option
,java.util.Optional
doesn't have a method like.orElse(Option<T>)
, where the fallback is also anOptional
. Instead, we work around it by wrapping any present value in another layer ofOptional
, so we can use.orElseGet()
to get the original value back if it was present, or otherwise return a differentOptional
value.This is a known bug in Safari - an empty user handle is distinct from a null/undefined user handle. Second-factor credentials typically do not return a user handle, so Safari should be setting it to null/undefined instead of an empty byte array.
We do not intend to add a workaround for this in the library, but…