Interface: ServerOptionsAuth
Defined in: projects/plugins/packages/api/src/lib/structures/http/Auth.ts:176
Defines the authentication options.
Since
1.0.0
Properties
cookie?
optional
cookie:string
Defined in: projects/plugins/packages/api/src/lib/structures/http/Auth.ts:188
The name for the cookie, this will be used to identify a Secure HttpOnly cookie.
Since
1.0.0
Default
'SAPPHIRE_AUTH'
domainOverwrite?
optional
domainOverwrite:string
Defined in: projects/plugins/packages/api/src/lib/structures/http/Auth.ts:221
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
id
id:
string
Defined in: projects/plugins/packages/api/src/lib/structures/http/Auth.ts:181
The client's application id, this can be retrieved in Discord Developer Portal at https://discord.com/developers/applications.
Since
1.0.0
redirect?
optional
redirect:string
Defined in: projects/plugins/packages/api/src/lib/structures/http/Auth.ts:207
The redirect uri. This will default to OAuth2BodyData.redirectUri if missing.
Since
1.0.0
scopes?
optional
scopes:OAuth2Scopes
[]
Defined in: projects/plugins/packages/api/src/lib/structures/http/Auth.ts:201
The scopes defined at https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes.
Since
1.0.0
Default
[OAuth2Scopes.Identify]
secret
secret:
string
Defined in: projects/plugins/packages/api/src/lib/structures/http/Auth.ts:194
The client secret, this can be retrieved in Discord Developer Portal at https://discord.com/developers/applications.
Since
1.0.0
transformers?
optional
transformers:LoginDataTransformer
[]
Defined in: projects/plugins/packages/api/src/lib/structures/http/Auth.ts:214
The login data transformers used for Auth.fetchData.
Since
1.4.0
Default
[]