Interface: ServerOptionsAuth
Defines the authentication options.
Since
1.0.0
Properties
cookie?
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:188
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:221
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:181
redirect?
optional
redirect:string
The redirect uri. This will default to OAuth2BodyData.redirectUri if missing.
Since
1.0.0
Defined in
projects/plugins/packages/api/src/lib/structures/http/Auth.ts:207
scopes?
optional
scopes:OAuth2Scopes
[]
The scopes defined at https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes.
Since
1.0.0
Default
[OAuth2Scopes.Identify]
Defined in
projects/plugins/packages/api/src/lib/structures/http/Auth.ts:201
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:194
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:214