Skip to content

Commit

Permalink
docs: add autoRefresh
Browse files Browse the repository at this point in the history
  • Loading branch information
casualmatt committed Jun 8, 2023
1 parent 65c1cdf commit f85c44c
Showing 1 changed file with 65 additions and 59 deletions.
124 changes: 65 additions & 59 deletions docs/content/1.getting-started/2.options.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,65 @@
# Options

Configure Nuxt Directus easily with the `directus` property.

---

```ts [nuxt.config]
export default {
// Defaults options
directus: {
autoFetch: true,
}
}
```

## `url`

- No default - **Required**

The url to which requests are made to.

## `autoFetch`

- Default: `true`

Should the user be fetched automatically

## `fetchUserParams`

- No default - **Optional**

The Parameters which should be sent when the user is fetched, see [DirectusQueryParams](https://github.com/directus-community/nuxt-directus/blob/313a5a227e1d8b88a43d92c79b47a87d92a21fc5/src/runtime/types/index.d.ts#L26)

## `token`

- No default - **Optional**

A static token

## `cookieNameToken`

- Default: `directus_token`

Specify the cookie name of the directus auth token

## `cookieNameRefreshToken`

- Default: `directus_refresh_token`

Specify the cookie name of the directus refresh auth token

## `devtools`

- Default: `false`

Activate the Nuxt Devtools, checkout [Devtools](/getting-started/devtools) before activating

::feedback-box
::
# Options

Configure Nuxt Directus easily with the `directus` property.

---

```ts [nuxt.config]
export default {
// Defaults options
directus: {
autoFetch: true,
}
}
```

## `url`

- No default - **Required**

The url to which requests are made to.

## `autoFetch`

- Default: `true`

Should the user be fetched automatically

## `autoRefresh`

- Default: `true`

Auto refesh tokens

## `fetchUserParams`

- No default - **Optional**

The Parameters which should be sent when the user is fetched, see [DirectusQueryParams](https://github.com/directus-community/nuxt-directus/blob/313a5a227e1d8b88a43d92c79b47a87d92a21fc5/src/runtime/types/index.d.ts#L26)

## `token`

- No default - **Optional**

A static token

## `cookieNameToken`

- Default: `directus_token`

Specify the cookie name of the directus auth token

## `cookieNameRefreshToken`

- Default: `directus_refresh_token`

Specify the cookie name of the directus refresh auth token

## `devtools`

- Default: `false`

Activate the Nuxt Devtools, checkout [Devtools](/getting-started/devtools) before activating

::feedback-box
::

0 comments on commit f85c44c

Please sign in to comment.