@@ -55,28 +55,7 @@ def generate_registration_options(
55
55
user_verification = UserVerificationRequirement .DISCOURAGED ,
56
56
resident_key = ResidentKeyRequirement .PREFERRED ,
57
57
)
58
- if len (hints ) > 0 :
59
- """
60
- Deferring to hints when present as per https://w3c.github.io/webauthn/#enum-hints
61
- """
62
- if hints [0 ] == "security-key" :
63
- # "For compatibility with older user agents, when this hint is used in
64
- # PublicKeyCredentialCreationOptions, the authenticatorAttachment SHOULD be set to
65
- # cross-platform."
66
- authenticator_attachment = AuthenticatorAttachment .CROSS_PLATFORM
67
- elif hints [0 ] == "hybrid" :
68
- # "For compatibility with older user agents, when this hint is used in
69
- # PublicKeyCredentialCreationOptions, the authenticatorAttachment SHOULD be set to
70
- # cross-platform."
71
- authenticator_attachment = AuthenticatorAttachment .CROSS_PLATFORM
72
- elif hints [0 ] == "client-device" :
73
- # "For compatibility with older user agents, when this hint is used in
74
- # PublicKeyCredentialCreationOptions, the authenticatorAttachment SHOULD be set to
75
- # platform."
76
- authenticator_attachment = AuthenticatorAttachment .PLATFORM
77
-
78
- authenticator_selection .authenticator_attachment = authenticator_attachment
79
- elif attachment != "all" :
58
+ if attachment != "all" :
80
59
authenticator_attachment = AuthenticatorAttachment .CROSS_PLATFORM
81
60
if attachment == "platform" :
82
61
authenticator_attachment = AuthenticatorAttachment .PLATFORM
0 commit comments