내용으로 건너뛰기

Android 설정

GitHub

Android에서 Passkey는 앱과 Relying-Party 도메인이 디지털 자산 링크를 통해 연결되어 있을 때 웹사이트와 함께 작동합니다.

설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설치 설정을 복사합니다. bunx cap syncAndroid 호스트 프로젝트를 생성하는 동안 플러그인은 다음과 같은 내용을 수정합니다:

  • injects the asset_statements manifest metadata
  • 생성된 문자열 리소스에 대한 참조를 포함하는 메타데이터

What you still need to host

호스팅에 필요한 항목

You must publish assetlinks.json 의존성 파티 도메인에 게시해야 합니다:

https://signin.example.com/.well-known/assetlinks.json

예시:

[
{
"relation": [
"delegate_permission/common.handle_all_urls",
"delegate_permission/common.get_login_creds"
],
"target": {
"namespace": "android_app",
"package_name": "app.capgo.passkey.example",
"sha256_cert_fingerprints": [
"AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99"
]
}
}
]
  1. 설정 origin 그리고 domains context: Capgo 마케팅 웹사이트. 역할: 짧은 UI 레이블 또는 네비게이션 아이템. 페이지: trust.astro 페이지. 메시지 키 `and` (And). plugins.CapacitorPasskey context: Page/area: Capgo marketing website. Role: Short UI label or navigation item. Seen in: page trust.astro. Message key `and` (And). capacitor.config.*.
  2. 실행 bunx cap sync.
  3. 실제 Android 패키지 이름을 사용하세요. assetlinks.json.
  4. 필요한 모든 서명 인증서 지문을 추가하세요. 디버그 또는 내부 서명 키도 포함하세요. 디버그 또는 내부 빌드를 테스트할 때.
  5. 파일을 동일한 도메인에서 호스팅하세요. 그 도메인을 Relying-Party ID로 사용합니다.

중요한 브라우저와의 동작 차이점

Section titled “브라우저와의 중요한 동작 차이점”

디지털 자산 링크를 구성했을 때, Android는 동일한 Relying Party와 Passkey를 웹사이트와 공유할 수 있습니다. 나머지 차이점은 네이티브에서 보고하는 Literal Origin입니다. clientDataJSON.

  • A normal Android app does not behave like a privileged browser.
  • Assertion origin can be tied to the Android app signature instead of your website origin.
  • If your backend strictly validates clientDataJSON.origin, accept the Android app origin alongside the website origin.

If you are using Android Setup to plan authentication and account flows, connect it with Using @capgo/capacitor-passkey for the native capability in Using @capgo/capacitor-passkey, @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, and 두 단계 인증 Capgo 구현 세부 사항에 대해 두 단계 인증.