Skip to content

Instantly share code, notes, and snippets.

@isterin
Last active August 29, 2015 14:21
Show Gist options
  • Save isterin/effcf227654e1ef6b76d to your computer and use it in GitHub Desktop.
Save isterin/effcf227654e1ef6b76d to your computer and use it in GitHub Desktop.
CoreTechCorp Advanced Auth Verification
app.post('/verify', function(req, res) {
var digest = crypto.createHmac('sha1', '--- priv key----').update("---pub key---").digest(encoding="base64");
if (req.body.sig_verify == digest) {
res.redirect('/demo/success.html')
}
else {
res.redirect("/demo/failure.html")
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment