A SQRL authentication protocol handler package
$ npm install sqrl-protocol
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
);