Interface: ServerOptionsAuth
Defined in: packages/api/src/lib/structures/http/Auth.ts:176
Defines the authentication options.
Since
1.0.0
Properties
cookie?
optionalcookie:string
Defined in: 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?
optionaldomainOverwrite:string
Defined in: 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: 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?
optionalredirect:string
Defined in: 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?
optionalscopes:OAuth2Scopes[]
Defined in: 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: 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?
optionaltransformers:LoginDataTransformer<LoginData>[]
Defined in: packages/api/src/lib/structures/http/Auth.ts:214
The login data transformers used for Auth.fetchData.
Since
1.4.0
Default
[]