소스 검색

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

Tianzhi Jin 1 년 전
부모
커밋
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,
 		},
 		webauthn.WithExclusions(credsDescriptors),
+		webauthn.WithResidentKeyRequirement(protocol.ResidentKeyRequirementPreferred),
+		webauthn.WithExtensions(protocol.AuthenticationExtensions{"credProps": true}),
 	)
 
 	if err != nil {