@types/riderize__passport-strava-oauth2
TypeScript icon, indicating that this package has built-in type declarations

2.1.6 • Public • Published

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

/* eslint-disable @definitelytyped/no-declare-current-package */
// eslint-disable-next-line @definitelytyped/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: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/express

Credits

These definitions were written by edilson.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/riderize__passport-strava-oauth2

Weekly Downloads

21

Version

2.1.6

License

MIT

Unpacked Size

6.11 kB

Total Files

5

Last publish

Collaborators

  • types