Переглянути джерело

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

Tianzhi Jin 10 місяців тому
батько
коміт
b65373db7e
1 змінених файлів з 2 додано та 0 видалено
  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,
 			nil,
 		},
 		},
 		webauthn.WithExclusions(credsDescriptors),
 		webauthn.WithExclusions(credsDescriptors),
+		webauthn.WithResidentKeyRequirement(protocol.ResidentKeyRequirementPreferred),
+		webauthn.WithExtensions(protocol.AuthenticationExtensions{"credProps": true}),
 	)
 	)
 
 
 	if err != nil {
 	if err != nil {