Ver Fonte

feat(webauthn): perfer creation of a client-side discoverable credential

Tianzhi Jin há 11 meses atrás
pai
commit
b65373db7e
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      internal/ui/webauthn.go

+ 2 - 0
internal/ui/webauthn.go

@@ -105,6 +105,8 @@ func (h *handler) beginRegistration(w http.ResponseWriter, r *http.Request) {
 			nil,
 		},
 		webauthn.WithExclusions(credsDescriptors),
+		webauthn.WithResidentKeyRequirement(protocol.ResidentKeyRequirementPreferred),
+		webauthn.WithExtensions(protocol.AuthenticationExtensions{"credProps": true}),
 	)
 
 	if err != nil {