Directus / @directus/sdk / auth / authentication
Function: authentication() ​
authentication(
mode
,config
): <Schema
>(client
) =>AuthenticationClient
<Schema
>
Creates a client to authenticate with Directus.
Parameters ​
• mode: AuthenticationMode
= 'cookie'
AuthenticationMode
• config: Partial
<AuthenticationConfig
>= {}
The optional configuration.
Returns ​
Function
A Directus authentication client.
Type parameters ​
• Schema
Parameters ​
• client:
DirectusClient
<Schema
>Returns ​
AuthenticationClient
<Schema
>