Sfoglia il codice sorgente

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

Tianzhi Jin 11 mesi fa
parent
commit
b65373db7e
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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 {