2.1.6 • Published 6 months ago

@types/riderize__passport-strava-oauth2 v2.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/riderize__passport-strava-oauth2

Summary

This package contains type definitions for @riderize/passport-strava-oauth2 (https://github.com/Riderize/passport-strava-oauth2).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/riderize__passport-strava-oauth2.

index.d.ts

// Type definitions for @riderize/passport-strava-oauth2 2.1
// Project: https://github.com/Riderize/passport-strava-oauth2
// Definitions by: edilson <https://github.com/edilson>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

// tslint:disable-next-line:no-single-declare-module
declare module '@riderize/passport-strava-oauth2' {
    import { Request } from 'express';

    interface Profile {
        provider: string;
        id: string;
        fullName: string;
        name: {
            familyName: string;
            givenName: string;
        };
        photos?: Array<{
            value: string;
        }> | undefined;
        token?: string | undefined;

        _raw: string;
        _json: any;
    }

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

        authorizationURL?: string | undefined;
        tokenURL?: string | undefined;
        profileURL?: string | undefined;
    }

    interface StrategyOptionWithRequest extends StrategyOption {
        passReqToCallback: true;
    }

    type VerifyFunction = (
        accessToken: string,
        refreshToken: string,
        profile: Profile,
        done: (error: any, user?: any, info?: any) => void,
    ) => void;

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

    class Strategy {
        constructor(options: StrategyOption, verify: VerifyFunction);
        constructor(options: StrategyOptionWithRequest, verify: VerifyFunctionWithRequest);

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

Additional Details

  • Last updated: Thu, 08 Jul 2021 22:42:06 GMT
  • Dependencies: @types/express
  • Global values: none

Credits

These definitions were written by edilson.

2.1.2

8 months ago

2.1.4

8 months ago

2.1.3

8 months ago

2.1.6

6 months ago

2.1.5

7 months ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.1

3 years ago

1.1.0

4 years ago