@userino/express
v1.0.1
Published
Express middleware for handling auth from [userino](https://github.com/userino-api/userino-admin-api) admin server.
Readme
Express middleware for handling auth from userino admin server.
Install
yarn add @userino/express
Usage
Example with required auth:
import userinoExpress from '@userino/express'
import express from 'express'
const app = express.Router()
app.use(userinoExpress.createCheckAuth())
// ... secured routes
Example with optional auth:
import express from 'express'
import { createInitUserSessionIfPossible, createVerifyUserSessionExists } from '@userino/express'
const app = express.Router()
// public routes
app.use(createInitUserSessionIfPossible())
// semi-public routes
app.use(createVerifyUserSessionExists())
// private routesSupported env
USERINO_URL(orUSERINO_ADMIN_URL). Default points to http://localhost:7303
If you have licence setup:
USERINO_CLIENT_IDUSERINO_CLIENT_SECRET
