#error

2 messages · Page 1 of 1 (latest)

unique bobcatBOT
#

Hi @mental flint. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

That ESLint error isn’t specific to Convex—it’s from the import/no-anonymous-default-export rule, which dislikes exporting an object literal directly.

Your auth.config.ts content is otherwise correct for Convex:

export default {
  providers: [
    {
      domain: process.env.CONVEX_SITE_URL,
      applicationID: "convex",
    },
  ],
};

This is exactly the pattern Convex shows for auth.config.ts (optionally with a type annotation using AuthConfig). [Manual setup; AuthConfig api]

If you want to satisfy that ESLint rule without changing behavior, assign the object to a named constant, then export it:

import type { AuthConfig } from "convex/server";

const authConfig: AuthConfig = {
  providers: [
    {
      domain: process.env.CONVEX_SITE_URL,
      applicationID: "convex",
    },
  ],
};

export default authConfig;

From Convex’s point of view, both forms are equivalent; only ESLint cares about the anonymous default export. The Convex docs also show using satisfies AuthConfig if you prefer that style:

import { AuthConfig } from "convex/server";

export default {
  providers: [
    {
      domain: process.env.CONVEX_SITE_URL,
      applicationID: "convex",
    },
  ],
} satisfies AuthConfig;
``` [[AuthConfig api](<https://docs.convex.dev/api/modules/server#authconfig>)]
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------