Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@wearemothership/capacitor-native-webauthn
Advanced tools
This plugin gives access to the native webauthn / passkey apis for android/ios
PassKey
npm install @darkedges/capacitor-native-webauthn
npx cap sync
isWebAuthnAvailable()
isWebAuthnAutoFillAvailable()
startRegistration(...)
startAuthentication(...)
isWebAuthnAvailable() => Promise<{ value: boolean; }>
Returns: Promise<{ value: boolean; }>
isWebAuthnAutoFillAvailable() => Promise<{ value: boolean; }>
Returns: Promise<{ value: boolean; }>
startRegistration(publicKeyCredentialCreationOptionsJSON: PublicKeyCredentialCreationOptionsJSON) => Promise<RegistrationResponseJSON>
Param | Type |
---|---|
publicKeyCredentialCreationOptionsJSON | PublicKeyCredentialCreationOptionsJSON |
Returns: Promise<RegistrationResponseJSON>
startAuthentication(requestOptionsJSON: PublicKeyCredentialRequestOptionsJSON, useBrowserAutofill?: boolean | undefined) => Promise<AuthenticationResponseJSON>
Param | Type |
---|---|
requestOptionsJSON | PublicKeyCredentialRequestOptionsJSON |
useBrowserAutofill | boolean |
Returns: Promise<AuthenticationResponseJSON>
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 |
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 |
Prop | Type |
---|---|
appid | boolean |
credProps | CredentialPropertiesOutput |
hmacCreateSecret | boolean |
Prop | Type |
---|---|
rk | boolean |
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 |
Prop | Type |
---|---|
id | string |
https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentityjson
Prop | Type |
---|---|
id | string |
name | string |
displayName | string |
Prop | Type |
---|---|
alg | COSEAlgorithmIdentifier |
type | PublicKeyCredentialType |
https://w3c.github.io/webauthn/#dictdef-publickeycredentialdescriptorjson
Prop | Type |
---|---|
id | Base64URLString |
type | PublicKeyCredentialType |
transports | AuthenticatorTransportFuture[] |
Prop | Type |
---|---|
authenticatorAttachment | AuthenticatorAttachment |
requireResidentKey | boolean |
residentKey | ResidentKeyRequirement |
userVerification | UserVerificationRequirement |
Prop | Type |
---|---|
appid | string |
credProps | boolean |
hmacCreateSecret | boolean |
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 |
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 | Base64URLString |
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 |
An attempt to communicate that this isn't just any string, but a Base64URL-encoded string
string
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'
number
"cross-platform" | "platform"
"public-key"
"discouraged" | "preferred" | "required"
"discouraged" | "preferred" | "required"
"direct" | "enterprise" | "indirect" | "none"
FAQs
This plugin gives access to the native webauthn / passkey apis for android/ios
We found that @wearemothership/capacitor-native-webauthn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.