Explorar el Código

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

Tianzhi Jin hace 10 meses
padre
commit
b65373db7e
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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 {