Skip to content
On this page

Directus Cloud

Everything you need to start building. Provisioned in 90 seconds. Starting at $15/month.

Get Started

This is an auto-generated document to support extension builders understand the internal packages they can utilize. To find our written guides, tutorials, and API/SDK reference, check out our main docs .

Directus / @directus/sdk / auth / AuthenticationClient

Interface: AuthenticationClient<_Schema> ​

Defined in: auth/types.ts:45

Type Parameters ​

• _Schema

Methods ​

getToken() ​

getToken(): Promise<null | string>

Defined in: auth/types.ts:53

Returns ​

Promise<null | string>


login() ​

Call Signature ​

login(payload, options?): Promise<AuthenticationData>

Defined in: auth/types.ts:46

Parameters ​
payload ​

LocalLoginPayload

options? ​

LoginOptions

Returns ​

Promise<AuthenticationData>

Call Signature ​

login(payload, options?): Promise<AuthenticationData>

Defined in: auth/types.ts:47

Parameters ​
payload ​

LDAPLoginPayload

options? ​

LoginOptions

Returns ​

Promise<AuthenticationData>


logout() ​

logout(options?): Promise<void>

Defined in: auth/types.ts:49

Parameters ​

options? ​

LogoutOptions

Returns ​

Promise<void>


refresh() ​

refresh(options?): Promise<AuthenticationData>

Defined in: auth/types.ts:48

Parameters ​

options? ​

RefreshOptions

Returns ​

Promise<AuthenticationData>


setToken() ​

setToken(access_token): Promise<unknown>

Defined in: auth/types.ts:54

Parameters ​

access_token ​

null | string

Returns ​

Promise<unknown>


stopRefreshing() ​

stopRefreshing(): void

Defined in: auth/types.ts:51

Returns ​

void