Releases: peterferguson/react-native-passkeys
v0.4.0 - PRF evalByCredential & credProps Extension Support
react-native-passkeys v0.4.0 π
A significant release adding advanced WebAuthn extensions support and improving cross-platform consistency.
π New Features
PRF Extension - Complete Support
The PRF (Pseudo-Random Function) extension is now fully supported, allowing you to derive cryptographic keys from credentials. This release adds evalByCredential support on top of the existing eval functionality.
Using eval for single PRF input:
// Derive a key using a single salt input
await passkey.get({
rpId: "example.com",
challenge: "...",
extensions: {
prf: {
eval: {
first: "base64url-encoded-salt",
// optional second salt
second: "base64url-encoded-salt-2",
},
},
},
});Using evalByCredential for per-credential inputs:
// Derive different keys for different credentials
await passkey.get({
rpId: "example.com",
challenge: "...",
extensions: {
prf: {
evalByCredential: {
[credentialId]: {
first: "base64url-encoded-salt",
// optional second salt
},
},
},
},
allowCredentials: [{ id: credentialId, type: "public-key" }],
});Platform Support:
- β iOS 18+
- β Android API 34+
- β Web (all modern browsers with WebAuthn Level 3)
Spec Compliance:
- Validates that
allowCredentialsis specified when usingevalByCredentialper WebAuthn Level 3 spec
credProps Extension Support
The credential properties extension (credProps) is now supported, allowing you to determine whether a credential is a client-side discoverable credential (passkey).
const result = await passkey.create({
// ... other options
extensions: {
credProps: true,
},
});
// Check if the credential is discoverable
const isDiscoverable = result?.clientExtensionResults?.credProps?.rk;Platform Support:
- β Android API 34+
- β Web
- π§ iOS (types included, implementation pending)
β¨ Improvements
Cross-Platform Consistency
getPublicKey()Normalization: Now returnsBase64URLStringon all platforms instead ofArrayBufferon web. This provides a consistent API across iOS, Android, and Web.
Enhanced Type Safety
- Improved TypeScript types for credential responses
- Better type inference for extension outputs
- More precise types for PRF inputs and outputs
Better Error Handling
- Enhanced input validation on iOS
- Better error messages for invalid PRF inputs
- Improved exception handling across all platforms
Documentation
- Comprehensive JSDoc comments across Android and iOS implementations
- Updated example app demonstrating new features
- Improved inline documentation for extension types
π± Example App Updates
- Add demonstration of
evalByCredentialusage - Upgrade to Expo SDK 54
- Upgrade Android compile SDK to 36
- Improve type safety and UI handling
- Add type definitions for @hexagon/base64
β οΈ Breaking Changes
getPublicKey() Return Type (Web only)
Previously on web, getPublicKey() returned ArrayBuffer | null. It now returns Base64URLString | null for consistency with iOS and Android implementations.
Migration:
// Before (web only)
const publicKeyBuffer = response.getPublicKey();
// convert to base64url manually
// After (all platforms)
const publicKeyBase64 = response.getPublicKey();
// Already in base64url format, ready to send to serverπ Related Issues & PRs
- Closes #31 - Apple and iOS WebAuthn PRF support
- Builds on #51 - feat: add support for PRF (eval) by @sparten11740
- Part of ongoing WebAuthn Level 3 compliance work
π Acknowledgments
Thanks to @sparten11740 (Jan W) for the initial PRF implementation that this release builds upon.
Full Changelog: v0.3.3...v0.4.0
v0.3.3
react-native-passkeys v0.3.3
Minor release with no functional changes.
Full Changelog: v0.3.2...v0.3.3
v0.3.2
react-native-passkeys v0.3.2
π Bug Fixes
iOS Safari Large Blob Fix
Fixed a crash in iOS Safari when requesting a largeBlob credential with an empty object using the get() method.
Solution: The extension now passes undefined if the request does not include a largeBlob object, preventing the crash.
Full Changelog: v0.3.1...v0.3.2
v0.3.1
react-native-passkeys v0.3.1
π New Features
getPublicKey Method
Added getPublicKey() method to credential responses, allowing you to retrieve the public key of a newly created credential.
const result = await passkey.create({
// ... options
});
const publicKey = result?.response.getPublicKey();π Bug Fixes
- Fixed Android support for Expo SDK 51
- Fixed default attestation preference to
noneon iOS
Full Changelog: v0.3.0...v0.3.1
v0.3.0 - Public Key Access & Expo SDK 51
β¨ New Features & Improvements
This release adds the ability to retrieve public keys from credentials and updates framework compatibility.
π― New Features
- π Added
getPublicKey()method to retrieve public keys from credentials (PRs #20, #21, #22)- iOS implementation with CBOR decoding
- Web implementation
- Android implementation
- π± React Native 0.74 support (PR #18 by @ashtar23)
- π¦ Expo SDK 51 compatibility (PR #18 by @ashtar23)
π Bug Fixes
- Fixed
noneand default attestation kind on iOS (PR #16 by @cruzdanilo) - Fixed Xcode 15.3 build issues (PR #11)
π§ Developer Experience
- Converted Android example to use expo-dev-client
- Updated example app to SDK 51
- Added public key getter UI to example app
- Updated README documentation
π Full Changelog
v0.2.2 - Android Support
π Android Support Added!
This release brings full Android support to react-native-passkeys.
β¨ New Features
- π€ Android implementation using CredentialManager API (PR #5 by @andrew-levy)
- π± Expo SDK 50 compatibility for Android (PR #6 by @BubbleTrouble14)
π Bug Fixes
- Fixed issue when using with Expo 50 on Android
- Added guard for
excludedCredentialsto prevent crashes - Fixed
largeBlobhandling on web with TypeScript ignore comment
π Documentation
- Improved Android setup documentation
- Added error handling examples
Supported Platforms
- β iOS
- β Android (NEW!)
- β Web
π Full Changelog
v0.1.6
What Changed
π§ Improvements
- Updated client extension types for better WebAuthn compatibility
- Fixed
AuthenticatorSelectionCriteriatype to use proper Record type
π Full Changelog
v0.1.4
What Changed
π§ Improvements
- Removed
only-allowpreinstall hook to improve package manager compatibility
π Full Changelog
v0.1.3
What Changed
π§ Improvements
- Updated type definitions to extend
@simplewebauthn/typesfor better TypeScript support - Improved type compatibility with the SimpleWebAuthn ecosystem
π Full Changelog
v0.1.2 - Initial Release
π Initial Release
This is the initial release of react-native-passkeys, providing WebAuthn/Passkeys support for React Native applications.
Features
- β¨ Initial iOS implementation using AuthenticationServices framework
- π Web implementation for browser compatibility
- π± Basic passkey registration and authentication support
Supported Platforms
- iOS
- Web
π Full Changelog