npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@teamzap/capacitor-native-webauthn

v0.0.2

Published

This plugin gives access to the native webauthn / passkey apis for android/ios

Downloads

2

Readme

@darkedges/capacitor-native-webauthn

PassKey

Install

npm install @darkedges/capacitor-native-webauthn
npx cap sync

API

isWebAuthnAvailable()

isWebAuthnAvailable() => Promise<{ value: boolean; }>

Returns: Promise<{ value: boolean; }>


isWebAuthnAutoFillAvailable()

isWebAuthnAutoFillAvailable() => Promise<{ value: boolean; }>

Returns: Promise<{ value: boolean; }>


startRegistration(...)

startRegistration(publicKeyCredentialCreationOptionsJSON: PublicKeyCredentialCreationOptionsJSON) => Promise<RegistrationResponseJSON>

| Param | Type | | -------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | publicKeyCredentialCreationOptionsJSON | PublicKeyCredentialCreationOptionsJSON |

Returns: Promise<RegistrationResponseJSON>


startAuthentication(...)

startAuthentication(requestOptionsJSON: PublicKeyCredentialRequestOptionsJSON, useBrowserAutofill?: boolean | undefined) => Promise<AuthenticationResponseJSON>

| Param | Type | | ------------------------ | ------------------------------------------------------------------------------------------------------- | | requestOptionsJSON | PublicKeyCredentialRequestOptionsJSON | | useBrowserAutofill | boolean |

Returns: Promise<AuthenticationResponseJSON>


Interfaces

RegistrationResponseJSON

A slightly-modified RegistrationCredential to simplify working with ArrayBuffers that are Base64URL-encoded in the browser so that they can be sent as JSON to the server.

https://w3c.github.io/webauthn/#dictdef-registrationresponsejson

| Prop | Type | | ----------------------------- | ------------------------------------------------------------------------------------------------------- | | id | Base64URLString | | rawId | Base64URLString | | response | AuthenticatorAttestationResponseJSON | | authenticatorAttachment | AuthenticatorAttachment | | clientExtensionResults | AuthenticationExtensionsClientOutputs | | type | PublicKeyCredentialType |

AuthenticatorAttestationResponseJSON

A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that are Base64URL-encoded in the browser so that they can be sent as JSON to the server.

https://w3c.github.io/webauthn/#dictdef-authenticatorattestationresponsejson

| Prop | Type | | ------------------------ | --------------------------------------------------------------------------- | | clientDataJSON | Base64URLString | | attestationObject | Base64URLString | | authenticatorData | Base64URLString | | transports | AuthenticatorTransportFuture[] | | publicKeyAlgorithm | COSEAlgorithmIdentifier | | publicKey | Base64URLString |

AuthenticationExtensionsClientOutputs

| Prop | Type | | ---------------------- | --------------------------------------------------------------------------------- | | appid | boolean | | credProps | CredentialPropertiesOutput | | hmacCreateSecret | boolean |

CredentialPropertiesOutput

| Prop | Type | | -------- | -------------------- | | rk | boolean |

PublicKeyCredentialCreationOptionsJSON

A variant of PublicKeyCredentialCreationOptions suitable for JSON transmission to the browser to (eventually) get passed into navigator.credentials.create(...) in the browser.

This should eventually get replaced with official TypeScript DOM types when WebAuthn L3 types eventually make it into the language:

https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptionsjson

| Prop | Type | | ---------------------------- | ----------------------------------------------------------------------------------------------------- | | rp | PublicKeyCredentialRpEntity | | user | PublicKeyCredentialUserEntityJSON | | challenge | Base64URLString | | pubKeyCredParams | PublicKeyCredentialParameters[] | | timeout | number | | excludeCredentials | PublicKeyCredentialDescriptorJSON[] | | authenticatorSelection | AuthenticatorSelectionCriteria | | attestation | AttestationConveyancePreference | | extensions | AuthenticationExtensionsClientInputs |

PublicKeyCredentialRpEntity

| Prop | Type | | -------- | ------------------- | | id | string |

PublicKeyCredentialUserEntityJSON

https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentityjson

| Prop | Type | | ----------------- | ------------------- | | id | string | | name | string | | displayName | string |

PublicKeyCredentialParameters

| Prop | Type | | ---------- | --------------------------------------------------------------------------- | | alg | COSEAlgorithmIdentifier | | type | PublicKeyCredentialType |

PublicKeyCredentialDescriptorJSON

https://w3c.github.io/webauthn/#dictdef-publickeycredentialdescriptorjson

| Prop | Type | | ---------------- | --------------------------------------------------------------------------- | | id | Base64URLString | | type | PublicKeyCredentialType | | transports | AuthenticatorTransportFuture[] |

AuthenticatorSelectionCriteria

| Prop | Type | | ----------------------------- | ----------------------------------------------------------------------------------- | | authenticatorAttachment | AuthenticatorAttachment | | requireResidentKey | boolean | | residentKey | ResidentKeyRequirement | | userVerification | UserVerificationRequirement |

AuthenticationExtensionsClientInputs

| Prop | Type | | ---------------------- | -------------------- | | appid | string | | credProps | boolean | | hmacCreateSecret | boolean |

AuthenticationResponseJSON

A slightly-modified AuthenticationCredential to simplify working with ArrayBuffers that are Base64URL-encoded in the browser so that they can be sent as JSON to the server.

https://w3c.github.io/webauthn/#dictdef-authenticationresponsejson

| Prop | Type | | ----------------------------- | ------------------------------------------------------------------------------------------------------- | | id | Base64URLString | | rawId | Base64URLString | | response | AuthenticatorAssertionResponseJSON | | authenticatorAttachment | AuthenticatorAttachment | | clientExtensionResults | AuthenticationExtensionsClientOutputs | | type | PublicKeyCredentialType |

AuthenticatorAssertionResponseJSON

A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that are Base64URL-encoded in the browser so that they can be sent as JSON to the server.

https://w3c.github.io/webauthn/#dictdef-authenticatorassertionresponsejson

| Prop | Type | | ----------------------- | ----------------------------------------------------------- | | clientDataJSON | Base64URLString | | authenticatorData | Base64URLString | | signature | Base64URLString | | userHandle | string |

PublicKeyCredentialRequestOptionsJSON

A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to (eventually) get passed into navigator.credentials.get(...) in the browser.

| Prop | Type | | ---------------------- | ----------------------------------------------------------------------------------------------------- | | challenge | Base64URLString | | timeout | number | | rpId | string | | allowCredentials | PublicKeyCredentialDescriptorJSON[] | | userVerification | UserVerificationRequirement | | extensions | AuthenticationExtensionsClientInputs |

Type Aliases

Base64URLString

An attempt to communicate that this isn't just any string, but a Base64URL-encoded string

string

AuthenticatorTransportFuture

A super class of TypeScript's AuthenticatorTransport that includes support for the latest transports. Should eventually be replaced by TypeScript's when TypeScript gets updated to know about it (sometime after 4.6.3)

'ble' | 'cable' | 'hybrid' | 'internal' | 'nfc' | 'smart-card' | 'usb'

COSEAlgorithmIdentifier

number

AuthenticatorAttachment

"cross-platform" | "platform"

PublicKeyCredentialType

"public-key"

ResidentKeyRequirement

"discouraged" | "preferred" | "required"

UserVerificationRequirement

"discouraged" | "preferred" | "required"

AttestationConveyancePreference

"direct" | "enterprise" | "indirect" | "none"