Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

u2f-api

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

u2f-api

Promisified U2F API for browsers

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44K
increased by17.44%
Maintainers
1
Weekly downloads
 
Created
Source

u2f-api

U2F API for browsers

API

Loading the library

The library is promisified and will use the built-in native promises of the browser, unless another promise library is injected.

The following are valid ways to load the library:

var u2fApi = require( 'u2f-api' ); // Will use the native Promise
// ... or
var u2fApi = require( 'u2f-api' )( require( 'bluebird' ) ); // Will use bluebird for promises

Registering a passkey

var u2fApi = require( 'u2f-api' )/* ( ... ) */;

// registerRequest can be 1 request, or an array.
u2fApi.register( registerRequests, signRequests = null, timeout = native default )
.then( ... )
.catch( ... );

Signing a passkey

var u2fApi = require( 'u2f-api' )/* ( ... ) */;

u2fApi.sign( signRequests, timeout = native default )
.then( ... )
.catch( ... );

Canceling

The returned promises from register() and sign() have a method cancel() which will cancel the request. This is nothing more than a helper function.

Keywords

FAQs

Package last updated on 12 Jun 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc