0.8.0 • Published 4 years ago

sqrl-protocol v0.8.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

SQRL-Protocol

License

A SQRL authentication protocol handler package

Installation

$ npm install sqrl-protocol

Usage

const sqrlProtocol = require('sqrl-protocol')({
  /* config */
});

// Start a login
const nut = await sqrlProtocol.createNut(req.connection.remoteAddress);
// Process a login
const sqrlResult = await sqrlProtocol.process(
  req.connection.remoteAddress,
  req.query.nut,
  req.body
);
// Finish a login
const user = await sqrlProtocol.useCode(
  req.connection.remoteAddress,
  req.query.code
);

License

MIT