Skip to content

Auth Service

This is the same service as in the node-server-starter, updates should be in both.

!!!

The current state intertwines auth with users too heavily.

“users” table should only have relevent info. “email”, “password” and “phone” are relevant identifiers, email_confimed should only be in auth tables.

It handles all the tokens, email and passwords for a given user.

This service exposes the router and the authPlugin functions.

export const AuthService = {
router: allAuthRouter,
authPlugin: authPlugin,
}