Skip to main content

Interface: ServerOptionsAuth

@sapphire/plugin-api.ServerOptionsAuth

Defines the authentication options.

since 1.0.0

Properties

Optional cookie: string

The name for the cookie, this will be used to identify a Secure HttpOnly cookie.

since 1.0.0

default 'SAPPHIRE_AUTH'

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:185


domainOverwrite

Optional domainOverwrite: string

The domain that should be used for the cookie. This overwrites the automatic detection of the domain.

remark if you want to support subdomains (one.example.two and two.example.com) then you need to use prefix your domain with a ., for example .example.com

since 2.1.0

default undefined

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:218


id

id: string

The client's application id, this can be retrieved in Discord Developer Portal at https://discord.com/developers/applications.

since 1.0.0

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:178


redirect

Optional redirect: string

The redirect uri. This will default to {@link OAuth2BodyData.redirectUri} if missing.

since 1.0.0

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:204


scopes

Optional scopes: string[]

The scopes defined at https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes.

since 1.0.0

default ['identify']

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:198


secret

secret: string

The client secret, this can be retrieved in Discord Developer Portal at https://discord.com/developers/applications.

since 1.0.0

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:191


transformers

Optional transformers: LoginDataTransformer<LoginData>[]

The login data transformers used for Auth.fetchData.

since 1.4.0

default []

Defined in

projects/plugins/packages/api/src/lib/structures/http/Auth.ts:211