npm.io
0.1.3 • Published 2 years ago

@types/passport-cognito

Licence
MIT
Version
0.1.3
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

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.