This project is an out-of-the-box cloud authentication powered by cloudflare workers. You can manage licenses for your software with ease. For multiple products, simply create separate namespaces for each product.
- Clone this repository.
- Make sure you have
npmandwranglerinstalled and configured. - Run
npm installto install dependencies - Generate a strong random server key (HMAC secret), for example:
openssl rand -base64 32
- Write the server key to
wrangler.jsonc. - Run
wrangler secret put SERVER_KEYto store the server key as a secret. - Run
npx wrangler d1 create auth-dbto create a new D1 database. - Update
wrangler.jsoncwith your database ID produced in step 7. - Apply migration by running the following command:
npx wrangler d1 migrate auth-db --local # For production: npx wrangler d1 migrate auth-db --remote - Your authentication app is now live! 🎉 Use
scripts/add_key.shto add your first key. You may also use other scripts to manage keys.
This project is licensed under the terms of the GNU General Public License v3.0.