### Hierarchy

- Options
  - AuthenticationTypeOAuth2

## Index

### Properties

- accessToken
- accessUrl
- clientId
- clientSecret
- expires
- privateKey
- refreshToken
- timeout
- type
- user

### Methods

- provisionCallback

## Properties

### Optional accessToken

accessToken: undefined | string

Inherited from Options.accessToken

- Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:24

An existing valid accessToken

### Optional accessUrl

accessUrl: undefined | string

Inherited from Options.accessUrl

- Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:22

Endpoint for token generation, defaults to 'https://accounts.google.com/o/oauth2/token'

### Optional clientId

clientId: undefined | string

Inherited from Options.clientId

- Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:16

Client ID value

### Optional clientSecret

clientSecret: undefined | string

Inherited from Options.clientSecret

- Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:18

Client secret value

### Optional expires

expires: ms

Inherited from Options.expires

- Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:28

Optional Access Token expire time in ms

### Optional privateKey

privateKey: string | object

Inherited from Options.privateKey

- Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:26

Private key for JSW

### Optional refreshToken

refreshToken: undefined | string

Inherited from Options.refreshToken

- Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:20

Refresh token for an user

### Optional timeout

timeout: s

Inherited from Options.timeout

- Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:30

Optional TTL for Access Token in seconds

### Optional type

type: "oauth2" | "OAuth2" | "OAUTH2"

- Defined in node_modules/@types/nodemailer/lib/smtp-connection.d.ts:32

indicates the authetication type, defaults to ‘login’, other option is ‘oauth2’

### Optional user

user: undefined | string

Inherited from Options.user

- Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:14

User e-mail address

## Methods

### Optional provisionCallback

- provisionCallback(user: string, renew: boolean, callback: function): void

- Inherited from Options.provisionCallback

  - Defined in node_modules/@types/nodemailer/lib/xoauth2.d.ts:32

  Function to run when a new access token is required

  #### Parameters

  - ##### user: string

  - ##### renew: boolean

  - ##### callback: function

    - - (err: Error | null, accessToken: string, expires: number): void

      - #### Parameters

        - ##### err: Error | null

        - ##### accessToken: string

        - ##### expires: number

        #### Returns void

Generated using TypeDoc