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
>