Skip to content

Instantly share code, notes, and snippets.

View garymedina's full-sized avatar

Gary Medina garymedina

  • Famcosoft
  • Boston MA
View GitHub Profile
@ChrisRisner
ChrisRisner / accounts.insert.js
Last active December 16, 2015 07:19
AuthDemo Scripts
var crypto = require('crypto');
var iterations = 1000;
var bytes = 32;
var aud = "Custom";
var masterKey = "Your-Master-Key";
function insert(item, user, request) {
var accounts = tables.getTable('accounts');
if (request.parameters.login) {
// this is a login attempt