Better AuthBA
Better Auth•8mo ago
Risatoga

segment.replace is not a function - Is this a bug?

I am getting this error.

Although everything seems to work fine, I am a bit concerned (being an auth library, I don't want any surprises 🙂 )

I couldn't find any reference to this error anywhere.

I am using:

"better-auth": "^1.2.7",
"next": "15.3.1",

server.ts
import { betterAuth } from 'better-auth';
import { nextCookies } from 'better-auth/next-js';
import { prismaAdapter } from 'better-auth/adapters/prisma';
import { db } from '@/db/prisma';

export const auth = betterAuth({
  user: {
    modelName: 'User',
  },
  basePath: '/api/auth',
  emailAndPassword: {
    enabled: true,
  },
  hooks: {},

  advanced: {
    database: {
      generateId: false,
    },
  },
  emailVerification: {},
  database: prismaAdapter(db, {
    provider: 'postgresql',
  }),
  plugins: [nextCookies()],
});
`

Can you please point me in the right direction and let me know if it's safe to keep using?

Thank you
image.png
Was this page helpful?