bragg-cognito-idp

0.1.1 • Public • Published

bragg-cognito-idp Build Status

Bragg middleware for AWS Cognito Userpool triggers

About

AWS Cognito Userpools uses different triggers to customize the authentication flow. The bragg-cognito-idp middleware for bragg provides 3 triggers that are essential for a custom implementation of the authentication flow.

Install

$ npm install bragg-cognito-idp

Usage

const app = require('bragg');
const router = require('bragg-router');
const cognito = require('bragg-cognito-idp');
 
router.post('idp:DefineAuthChallenge', ctx => {
    ctx.body = ctx.request.body
});
 
router.post('idp:CreateAuthChallenge', ctx => {
    ctx.body = ctx.request.body
});
 
router.post('idp:VerifyAuthChallengeResponse', ctx => {
    ctx.body = ctx.request.body
});
 
app.use(cognito());
app.use(router.routes());
 
exports.handler = app.listen();

API

cognito()

Install the cognito middleware.

License

MIT © Simon Jang

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i bragg-cognito-idp

    Weekly Downloads

    0

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    4.62 kB

    Total Files

    4

    Last publish

    Collaborators

    • simonja