UNPKG

@0xbigboss/react-native-passkeys

Version:

A library for using (webauthn) passkeys on iOS, Android & web with a single api

23 lines 811 B
import { requireNativeModule } from "expo-modules-core"; import { NotSupportedError } from "./errors"; const passkeys = requireNativeModule("ReactNativePasskeys"); // It loads the native module object from the JSI or falls back to // the bridge module (from NativeModulesProxy) if the remote debugger is on. export default { ...passkeys, async create(request) { if (!this.isSupported) throw new NotSupportedError(); const credential = await passkeys.create(request); return { ...credential, response: { ...credential.response, getPublicKey() { return credential.response?.publicKey; }, }, }; }, }; //# sourceMappingURL=ReactNativePasskeysModule.js.map