self-hosted, bare-bones licensing API
Basically a very limited version of what keygen.sh does.
-
configure Amazon SES or get some gmail creds
-
install
npm i authkey
- use
const authkey = require('authkey')
authkey({
from: 'superthing@things.com'
productName: 'SuperThing',
mailerConfig: {
// see below for other services
type: 'gmail',
credentials: {
user: process.env.GMAIL_USER,
pass: process.env.GMAIL_PASS,
}
},
}).listen()
service (type ) |
required credentials |
---|---|
amazonSES |
accessKeyId , secretAccessKey , region |
gmail |
user , pass |
verb | endpoint | what it does |
---|---|---|
POST |
/request/:address |
creates a new auth key for the given address and sends an email with the auth key |
POST |
/verify/:authkey |
verifies the given auth key |
a JSON file handled with lowdb
SemVer is used (with help of semantic-release).
git clone https://github.com/adekbadek/authkey.git
cd authkey/
npm i
npm t
Will install the dependencies and run tests in watch mode.
with Jest
npm t
using Standard