---
title: RELKIT_ROUTE_AUTH_UNAVAILABLE
description: "A route requires a session, but the app has no Better Auth service."
pagination: false
search:
  keywords: [RELKIT_ROUTE_AUTH_UNAVAILABLE]
sidebar:
  icon: triangle-alert
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

**A route requires a session, but the app has no Better Auth service.**

## What happened

A route sets `auth: "required"`, and the application defines no Better Auth service, so no request could ever have a session. At run time such a route answers every request with 401.

## What to do

Add a Better Auth service with `defineBetterAuthService({ auth })`, or remove `auth: "required"` from the route.

Reported by `@relkit/cli`, `relkit/diagnostics`.

See [all error codes](/docs/errors).
