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