---
title: "nuxt-backend/auth.config"
description: "Every export of nuxt-backend/auth.config, with its signature and where it is defined."
canonical_url: "https://nuxt-backend.dev/docs/reference/api/auth-config"
---
# nuxt-backend/auth.config

## Interfaces

### DefineBackendAuthConfigOptions

Defined in: [src/convex/auth.config.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/auth.config.ts)

Where the backend's tokens come from, for an app that moved them.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="basepath">
        
      </a>
      
       <code>
        basePath?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The auth routes' base path, where the token signer's JWKS is served. Default <code>
        /api/auth
      </code>
      
      .
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/auth.config.ts" rel="nofollow">
        src/convex/auth.config.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="jwks">
        
      </a>
      
       <code>
        jwks?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      A static JWKS, for a deployment that sets its signing keys itself instead of storing them.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/convex/auth.config.ts" rel="nofollow">
        src/convex/auth.config.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

## Variables

### default

```ts
default: AuthConfig;
```

Defined in: [src/convex/auth.config.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/auth.config.ts)

## Functions

### defineBackendAuthConfig()

```ts
function defineBackendAuthConfig(options?): AuthConfig;
```

Defined in: [src/convex/auth.config.ts](https://github.com/qruto/nuxt-backend/blob/main/src/convex/auth.config.ts)

The Convex auth config that trusts the backend's tokens: the session JWTs
the `backend` component signs, verified against its JWKS on the
deployment's site URL. `nuxt-backend/auth.config` exports it with the
defaults, which the scaffolded `backend/auth.config.ts` re-exports; call
it yourself only to move the auth routes or pin the keys.

#### Parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="#definebackendauthconfigoptions">
        <code>
          DefineBackendAuthConfigOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

#### Returns

`AuthConfig`

#### Example

```ts [backend/auth.config.ts]
import { defineBackendAuthConfig } from 'nuxt-backend/auth.config'

export default defineBackendAuthConfig({ basePath: '/auth' })
```


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
