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

1.0.3 • Public • Published

Installation

npm install --save @types/passport-kakao

Summary

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

Details

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

index.d.ts

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

export interface Profile extends passport.Profile {
    id: string;
    provider: string;

    _raw: string;
    _json: any;
}

export interface StrategyOption {
    clientID: string;
    callbackURL: string;

    clientSecret?: string | undefined;
    scopeSeparator?: string | undefined;
    customHeaders?: string | undefined;
}

export interface StrategyOptionWithRequest extends StrategyOption {
    passReqToCallback: true;
}

export type VerifyFunction = (
    accessToken: string,
    refreshToken: string,
    profile: Profile,
    done: (error: any, user?: any, info?: any) => void,
) => void;
export type VerifyFunctionWithRequest = (
    req: express.Request,
    accessToken: string,
    refreshToken: string,
    profile: Profile,
    done: (error: any, user?: any, info?: any) => void,
) => void;

export class Strategy extends passport.Strategy {
    constructor(options: StrategyOption, verify: VerifyFunction);
    constructor(options: StrategyOptionWithRequest, verify: VerifyFunctionWithRequest);

    authenticate(req: express.Request, options?: any): void;
    userProfile: (accessToken: string, done: (error: any, user?: any) => void) => void;
}

Additional Details

Credits

These definitions were written by Park9eon, and ZeroCho.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/passport-kakao

Weekly Downloads

5,432

Version

1.0.3

License

MIT

Unpacked Size

5.43 kB

Total Files

5

Last publish

Collaborators

  • types