Concierge-koa
Koa-based JS client library for Concierge service
installation
npm install --save @evo/concierge-koa
usage
import { conciergeAuthMiddleware } from "concierge-koa";
const app: Koa = new Koa();
app.use(conciergeAuthMiddleware);
Now you can access it in a Koa context
app.use(async (ctx: Koa.BaseContext, next: any) => {
console.log(ctx.conciergeUser);
/**
* prints ->
* ConciergeUserInfo {
userId: 'user_id_1',
profile: Map { 'email' => 'user_id_1@example.com' },
accessToken: 'user_1',
meta: { services_meta: { project: 'uaprom' } }
}
*/
await next();
})