You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fido2ErrorCodes are meant to be sequential enums, not flags #692
The compiler is giving me a strange bit of pop-up advice in VS2026. Because higher-value enum names in Fido2ErrorCode are, mathematically, a bitwise combination of their predecessors (except those landing on prime numbers), I get nonsense like Fido2ErrorCode.InvalidSignCount = Fido2ErrorCode.InvalidRpidHash | Fido2ErrorCode.InvalidSignature, which I think we can agree isn't accurate. Another example is below.
The fix I'd propose would be:
Remove the [Flag] decorator from the top of the file or,
Assign escalating powers of two to each value, so they can be used as flags.
For the code I'm writing, it doesn't make much difference, but it could confuse more people than just me (and confusing me isn't much of a challenge).
Activity
Remove [Flags] from Fido2ErrorCode (#695)
Remove [Flags] from Fido2ErrorCode (passwordless-lib#694)