{"_id":"@plasmalaboratories/react-native-passkeys","name":"@plasmalaboratories/react-native-passkeys","dist-tags":{"latest":"0.4.2"},"versions":{"0.4.2":{"name":"@plasmalaboratories/react-native-passkeys","version":"0.4.2","description":"A library for using (webauthn) passkeys on iOS, Android & web with a single api","main":"build/index.js","types":"build/index.d.ts","scripts":{"build":"expo-module build","check-exports":"attw --pack .","ci":"pnpm run lint && pnpm run format:check && pnpm run prepare && pnpm run check-exports","clean":"expo-module clean","expo-module":"expo-module","format":"oxfmt --write ./src","format:check":"oxfmt --check ./src","lint":"oxlint ./src","lint:fix":"oxlint --fix ./src","open:ios":"open -a \"Xcode\" example/ios","open:android":"open -a \"Android Studio\" example/android","prepare":"expo-module prepare","prepublishOnly":"expo-module prepublishOnly","test":"expo-module test"},"keywords":["react-native","auth","webauthn","passkeys","expo","rn-passkeys","react-native-passkeys","ReactNativePasskeys"],"repository":{"type":"git","url":"git+https://github.com/peterferguson/react-native-passkeys.git"},"bugs":{"url":"https://github.com/peterferguson/react-native-passkeys/issues"},"author":{"name":"Peter Ferguson","email":"peterferguson95@gmail.com","url":"https://github.com/peterferguson"},"license":"MIT","homepage":"https://github.com/peterferguson/react-native-passkeys#readme","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.4","@changesets/cli":"^2.26.2","@expo/npm-proofread":"^1.0.1","@simplewebauthn/typescript-types":"^8.0.0","@types/react":"^18.0.25","expo-module-scripts":"^3.4.1","expo-modules-core":"^1.11.9","oxfmt":"^0.45.0","oxlint":"^1.60.0","typescript":"^5.2.2"},"peerDependencies":{"expo":">=53.0.0","react":"*","react-native":">=0.71.0"},"_id":"@plasmalaboratories/react-native-passkeys@0.4.2","gitHead":"0279cee700c6a3d1baa0ef326e7c8d9bf8489502","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-tWcb/SXeAximJk2DVq2J2PAUVsL9jaNR01jyw7Ye0H5uzMsfInBz/yIUWKUcJUpkA5dF/fudTT6IOkhWyg1u1w==","shasum":"66fbf4d30311ba788bbf5325c1b4cc51217d959c","tarball":"https://registry.npmjs.org/@plasmalaboratories/react-native-passkeys/-/react-native-passkeys-0.4.2.tgz","fileCount":58,"unpackedSize":180472,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCFY5i4qId2D/UELMOHOWVotiTBTiZpGFzi34Uu2Z2aUgIgVP90OA2ysvK0BBv9Ypdp3Tw4XcGY0JopoKR7oTAj6I0="}]},"_npmUser":{"name":"ps_plasma","email":"ps@plasma.to"},"directories":{},"maintainers":[{"name":"ps_plasma","email":"ps@plasma.to"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-passkeys_0.4.2_1788682223094_0.9363922846031583"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-06T08:10:22.927Z","0.4.2":"2026-09-06T08:10:23.230Z","modified":"2026-09-06T08:10:23.444Z"},"maintainers":[{"name":"ps_plasma","email":"ps@plasma.to"}],"description":"A library for using (webauthn) passkeys on iOS, Android & web with a single api","homepage":"https://github.com/peterferguson/react-native-passkeys#readme","keywords":["react-native","auth","webauthn","passkeys","expo","rn-passkeys","react-native-passkeys","ReactNativePasskeys"],"repository":{"type":"git","url":"git+https://github.com/peterferguson/react-native-passkeys.git"},"author":{"name":"Peter Ferguson","email":"peterferguson95@gmail.com","url":"https://github.com/peterferguson"},"bugs":{"url":"https://github.com/peterferguson/react-native-passkeys/issues"},"license":"MIT","readme":"# React Native Passkeys\n\nThis is an Expo module to help you create and authenticate with passkeys on iOS, Android & web with the same api. The library aims to stay close to the standard [`navigator.credentials`](https://w3c.github.io/webappsec-credential-management/#framework-credential-management). More specifically, we provide an api for `get` & `create` functions (since these are the functions available cross-platform).\n\nThe adaptations we make are simple niceties like providing automatic conversion of base64-url encoded strings to buffer. This is also done to make it easier to pass the values to the native side.\n\nFurther niceties include some flag functions that indicate support for certain features.\n\n## Installation\n\n```sh\nnpx expo install @plasmalaboratories/react-native-passkeys\n```\n\n## iOS Setup\n\n#### 1. Host an Apple App Site Association (AASA) file\n\nFor Passkeys to work on iOS, you'll need to host an AASA file on your domain. This file is used to verify that your app is allowed to handle the domain you are trying to authenticate with. This must be hosted on a site with a valid SSL certificate.\n\nThe file should be hosted at:\n\n```\nhttps://<your_domain>/.well-known/apple-app-site-association\n```\n\nNote there is no `.json` extension for this file but the format is json. The contents of the file should look something like this:\n\n```json\n{\n  \"webcredentials\": {\n    \"apps\": [\"<teamID>.<bundleID>\"]\n  }\n}\n```\n\nReplace `<teamID>` with your Apple Team ID and `<bundleID>` with your app's bundle identifier.\n\n#### 2. Add Associated Domains\n\nAdd the following to your `app.json`:\n\n```json\n{\n  \"expo\": {\n    \"ios\": {\n      \"associatedDomains\": [\"webcredentials:<your_domain>\"]\n    }\n  }\n}\n```\n\nReplace `<your_domain>` with the domain you are hosting the AASA file on. For example, if you are hosting the AASA file on `https://example.com/.well-known/apple-app-site-association`, you would add `example.com` to the `associatedDomains` array.\n\n#### 3. Add minimum deployment target\n\nAdd the following to your `app.json`:\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\n      [\n        \"expo-build-properties\",\n        {\n          \"ios\": {\n            \"deploymentTarget\": \"15.0\"\n          }\n        }\n      ]\n    ]\n  }\n}\n```\n\n#### 4. Prebuild and run your app\n\n```sh\nnpx expo prebuild -p ios\nnpx expo run:ios # or build in the cloud with EAS\n```\n\n## Android Setup\n\n#### 1. Host an `assetlinks.json` File\n\nFor Passkeys to work on Android, you'll need to host an `assetlinks.json` file on your domain. This file is used to verify that your app is allowed to handle the domain you are trying to authenticate with. This must be hosted on a site with a valid SSL certificate.\n\nThe file should be hosted at:\n\n```\nhttps://<your_domain>/.well-known/assetlinks.json\n```\n\nand should look something like this (you can generate this file using the [Android Asset Links Assistant](https://developers.google.com/digital-asset-links/tools/generator)):\n\n```json\n[\n  {\n    \"relation\": [\n      \"delegate_permission/common.handle_all_urls\",\n      \"delegate_permission/common.get_login_creds\"\n    ],\n    \"target\": {\n      \"namespace\": \"android_app\",\n      \"package_name\": \"<package_name>\",\n      \"sha256_cert_fingerprints\": [\"<sha256_cert_fingerprint>\"]\n    }\n  }\n]\n```\n\nReplace `<package_name>` with your app's package name and `<sha256_cert_fingerprint>` with your app's SHA256 certificate fingerprint.\n\nThe `get_login_creds` relation is required for passkey flows via Android's Credential Manager — without it, calls will fail silently or return \"no matching credentials\". `handle_all_urls` alone is only enough for App Links. See [Credential Manager prerequisites](https://developer.android.com/identity/credential-manager/prerequisites).\n\n> **Note on DAL caching:** Android caches `assetlinks.json` for up to 24 hours. After updating, reinstall the app on your device/emulator to force a fresh fetch.\n\n#### 2. Modify Expo Build Properties\n\nNext, you'll need to modify the `compileSdkVersion` in your `app.json` to be at least 34.\n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\n      [\n        \"expo-build-properties\",\n        {\n          \"android\": {\n            \"compileSdkVersion\": 34\n          }\n        }\n      ]\n    ]\n  }\n}\n```\n\n#### 3. Prebuild and run your app\n\n```sh\nnpx expo prebuild -p android\nnpx expo run:android # or build in the cloud with EAS\n```\n","readmeFilename":"README.md","_rev":"1-9f9de9a0dde505a8acaa5d5b29972564"}