# @types/passport-apple

> TypeScript definitions for passport-apple

Latest version **2.0.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/passport-apple
pnpm add @types/passport-apple
yarn add @types/passport-apple
bun add @types/passport-apple
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2023-11-07 |
| First published | 2020-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/passport-apple
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-apple
- npm.io page: https://npm.io/package/@types/passport-apple

## Dependencies (2)

- [@types/express](https://npm.io/package/@types/express.md) *
- [@types/passport-oauth2](https://npm.io/package/@types/passport-oauth2.md) *

## Recent versions

- 2.0.3 (latest) — 2023-11-07
- 1.1.1 (ts3.6) — 2021-07-08
- 1.1.0 (ts3.0) — 2020-07-22
- 2.0.2 — 2023-10-18
- 2.0.1 — 2023-10-06
- 2.0.0 — 2023-10-05
- 1.1.2 — 2023-09-24

## README

# Installation
> `npm install --save @types/passport-apple`

# Summary
This package contains type definitions for passport-apple (https://github.com/ananay/passport-apple#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-apple.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-apple/index.d.ts)
````ts
import { Request } from "express";
import OAuth2Strategy = require("passport-oauth2");

declare namespace AppleStrategy {
    interface AuthenticateOptionsBase extends Partial<OAuth2Strategy._StrategyOptionsBase> {
        authorizationURL?: string | undefined;
        tokenURL?: string | undefined;
        clientID: string;
        teamID: string;
        keyID: string;
        privateKeyLocation?: string | undefined;
        privateKeyString?: string | undefined;
    }

    interface AuthenticateOptions extends AuthenticateOptionsBase {
        passReqToCallback: false;
    }

    interface AuthenticateOptionsWithRequest extends AuthenticateOptionsBase {
        passReqToCallback?: true | undefined;
    }

    type AppleAuthorizationParams = object & {
        response_mode: "form_post";
        scope: "name email";
        response_type: "code id_token";
        state: string | undefined;
    };

    interface Profile {
        [key: string]: any;
    }

    type VerifyCallback = (err?: Error | null, user?: object, info?: object) => void;

    type VerifyFunction = (
        accessToken: string,
        refreshToken: string,
        idToken: string,
        profile: Profile,
        verified: VerifyCallback,
    ) => void;

    type VerifyFunctionWithRequest = (
        req: Request,
        accessToken: string,
        refreshToken: string,
        idToken: string,
        profile: Profile,
        verified: VerifyCallback,
    ) => void;

    const Strategy: typeof AppleStrategy;
}

// @ts-ignore AppleStrategy's options type incompatible with OAuth2Strategy's options type
declare class AppleStrategy extends OAuth2Strategy {
    constructor(options: AppleStrategy.AuthenticateOptions, verify: AppleStrategy.VerifyFunction);
    constructor(options: AppleStrategy.AuthenticateOptionsWithRequest, verify: AppleStrategy.VerifyFunctionWithRequest);

    authorizationParams(options: object): AppleStrategy.AppleAuthorizationParams;
    name: "apple";
}

export = AppleStrategy;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/passport-oauth2](https://npmjs.com/package/@types/passport-oauth2)

# Credits
These definitions were written by [ytkalan](https://github.com/atomyyyy).

---
_Source: https://npm.io/package/@types/passport-apple · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
