node-nonce

1.0.1 • Public • Published

Node.js Nonce

Authenticate your web forms and endpoints easily and tokenize your actions to prevent CSRF.

npm install node-nonce --save
const nonce = require('node-nonce').config({
    secret: 'eiwer9weriorl2342i323i4e'
});
 
// init
nonce.init( req, res ); // request and response (HTTP)
 
// create a nonce
const nonce_token = nonce.create( 'some-action' );
 
// verify a nonce
nonce.verify( nonce_token, 'some-action' );

I am still working on this.

Readme

Keywords

none

Package Sidebar

Install

npm i node-nonce

Weekly Downloads

1

Version

1.0.1

License

GPLv3

Unpacked Size

5.43 kB

Total Files

3

Last publish

Collaborators

  • elhardoum