@evo/concierge-koa
TypeScript icon, indicating that this package has built-in type declarations

0.0.16 • Public • Published

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();
})

/@evo/concierge-koa/

    Package Sidebar

    Install

    npm i @evo/concierge-koa

    Weekly Downloads

    7

    Version

    0.0.16

    License

    ISC

    Unpacked Size

    31.5 kB

    Total Files

    18

    Last publish

    Collaborators

    • stoyanovk
    • lequan
    • zemlanin
    • alexander
    • seedofjoy
    • 041616
    • docccdev
    • orhideous
    • tailhook
    • hunson.abadeer
    • mark_tven
    • amostovenko
    • sadkovoy
    • himiranov
    • evo-kazymyrov