Skip to content

elhardoum/node-nonce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Node.js nonce and CSRF tool for forms and URLs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published