plug-auth-server
Installation
npm install --save plug-auth-server
Usage
See the example app for a more in-depth example.
const secret = fs const engine = const app = app
API
authenticator(options: object)
Options:
-
auth
: Login details for a plug.dj account. This account will be used for the requests needed to verify a plug.dj user.auth.email
: Email address.auth.password
: Password.
-
secret
: Key used to sign authentication tokens. -
users
: Optional - a user repository instance.
authRoute(authenticator: object)
Create an express/koa-style route handler for the authentication endpoint. Works
well together with plug-auth-client's httpTransport
.
const engine = const app = app