@types/passport-cognito
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Installation

npm install --save @types/passport-cognito

Summary

This package contains type definitions for passport-cognito (https://github.com/kndt84/passport-cognito).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-cognito.

index.d.ts

import passport = require("passport");
import express = require("express");

export interface CognitoStrategyOptions {
    userPoolId: string;
    clientId: string;
    region: string;
}

export type CognitoVerifyFunction = (
    accessToken: string,
    idToken: string,
    refreshToken: string,
    user: object,
    done: (error: any, user?: any) => void,
) => any;

export class Strategy extends passport.Strategy {
    constructor(options: CognitoStrategyOptions, verify: CognitoVerifyFunction);

    name: string;
    authenticate(req: express.Request, options?: object): void;
}

Additional Details

Credits

These definitions were written by Maksym Butsykin.

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @types/passport-cognito

    Weekly Downloads

    338

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    3.96 kB

    Total Files

    5

    Last publish

    Collaborators

    • types