GenerateId false is not working
Even with
generateIdgenerateId 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 defaultexport 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;
}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;
}