GenerateId false is not working

Even with generateId set to false, when I try to login I get the error because its trying to use its own id instead of the db's default

export function initAuth() {
  if (authInstance) {
    return authInstance;
  }

  authInstance = betterAuth({
    database: drizzleAdapter(getDB(), {
      debugLogs: true,
      provider: "pg",
      schema: {
        user: users,
        verification: verifications,
        account: accounts,
        session: sessions,
      },
    }),
    trustedOrigins: ["http://localhost:3000"],
    emailAndPassword: {
      enabled: true,
    },
    advanced: {
      cookiePrefix: "kipap",
      database: {
        generateId: false,
      },
    },
    plugins: [expo() as BetterAuthPlugin],
  });

  logger.info("Auth initialized");

  return authInstance;
}
Was this page helpful?