Skip to content

@capgo/capacitor-passkey

code 브라우저 스타일의 WebAuthn을 Capacitor 앱에 저장하고 플러그인은 네이티브 패스키 호출과 네이티브 호스트 패칭을 처리합니다.

브라우저 스타일 API

보존 navigator.credentials.create() 그리고 navigator.credentials.get() 앱 내에서 API 대신 사용할 수 있는 패스 키 흐름을 다시 작성하지 않도록

최소한의 앱 변경

__CAPGO_KEEP_0__의 웹 인증 (__CAPGO_KEEP_0__)을 브라우저 구현과 가깝게 유지하기 위해 CapacitorPasskey.autoShimWebAuthn() during bootstrap, and keep the rest of your WebAuthn code close to the browser implementation.

iOS 및 Android 호스트 프로젝트를 동기화하는 동안 생성된 파일을 패치하여 수동으로 편집할 필요가 없습니다.

플랫폼 관련 주의 사항

  • shimWebAuthn(options?) 브라우저 스타일의 shim을 즉시 설치하고 HTTPS 원본 오버라이드 옵션을 포함합니다.
  • getConfiguration() 해당 런타임 구성이 해결된 것을 읽습니다. plugins.CapacitorPasskey.
  • autoShimWebAuthn(options?) 그 구성이 읽히고 shim을 앱 부트스트랩 중에 단일 단계로 설치합니다.
  • createCredential(options) JSON-안전한 WebAuthn 페이로드와 함께 네이티브 패스키 API를 직접 호출합니다. getCredential(options) 런타임 사용 가능성 보고
  • isSupported() runtime config getPluginVersion() __CAPGO_KEEP_0__: __CAPGO_KEEP_0__