perfood / couch-auth

Powerful authentication for APIs and apps using CouchDB (or Cloudant) with Node >= 14
MIT License
66 stars 19 forks source link

Extract the core functionality into a separate package #54

Open fynnlyte opened 1 year ago

fynnlyte commented 1 year ago

Split out the core API s.t. Express doesn't need to be installed. Put that into a separate package.

  1. Extract everything that happens in user.ts + its dependencies (dbAuth, mailer,...) into a separate couch-auth-core module. Most of the programmatic API could be used without express.
  2. Add this module as dependency to couch-auth, import it in index.ts and routes.ts to get the current functionality.