Socket
Socket
Sign inDemoInstall

@types/passport-naver

Package Overview
Dependencies
13
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/passport-naver

TypeScript definitions for passport-naver


Version published
Weekly downloads
1.2K
increased by22.19%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Installation

npm install --save @types/passport-naver

Summary

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

Details

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

index.d.ts

// Type definitions for passport-naver 1.0
// Project: https://github.com/naver/passport-naver
// Definitions by: Park9eon <https://github.com/Park9eon>
//                 ZeroCho <https://github.com/zerocho>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

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

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

    _json: {
        email: string,
        nickname: string,
        profile_image: string,
        age: number,
        birthday: any
        id: string
    };
}

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

    svcType?: number | undefined;
    authType?: string | undefined;

    authorizationURL?: string | undefined;
    tokenURL?: string | undefined;
    profileURL?: 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;
    authorizationParams: (options: any) => any;
    userProfile: (accessToken: string, done: (error: any, user?: any) => void) => void;
}

Additional Details

Credits

These definitions were written by Park9eon, and ZeroCho.

FAQs

Last updated on 06 Jul 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc