---
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

Version: nuxt-backend 0.6.x · Tab: Reference · Kind: reference · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

## 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.

#### Properties

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

<tbody>
  <tr>
    <td>
      <a id="paths">
        
      </a>
      
       <code>
        paths?
      </code>
    </td>
    
    <td>
      <code>
        Partial
      </code>
      
      <<a href="https://nuxt-backend.dev/docs/reference/api/auth#backendpaths">
        <code>
          BackendPaths
        </code>
      </a>
      
      >
    </td>
    
    <td>
      The app's paths, from the <code>
        paths.generated.ts
      </code>
      
       the Nuxt module writes: <code>
        authRoute
      </code>
      
      , where the token signer's JWKS is served, is the one read here. 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, under the auth route nuxt.config names
(`backend.authRoute`). The scaffolded `backend/auth.config.ts` calls it
with the generated paths; pass `jwks` only to 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'
import { paths } from './paths.generated'

export default defineBackendAuthConfig({ paths })
```

## References

### BackendPaths

Re-exports [BackendPaths](https://nuxt-backend.dev/docs/reference/api/auth#backendpaths)


## Sitemap

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