Skip to content

Commit 6f7d3a3

Browse files
fix(cli): remove explicit BatterAuthOptions types
1 parent 701334b commit 6f7d3a3

File tree

1 file changed

+10
-10
lines changed
  • apps/cli/templates/auth/better-auth/server/base/src

1 file changed

+10
-10
lines changed

apps/cli/templates/auth/better-auth/server/base/src/index.ts.hbs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{#if (eq orm "prisma")}}
2-
import { betterAuth, type BetterAuthOptions } from "better-auth";
2+
import { betterAuth } from "better-auth";
33
import { prismaAdapter } from "better-auth/adapters/prisma";
44
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
55
import { expo } from "@better-auth/expo";
@@ -10,7 +10,7 @@ import { polarClient } from "./lib/payments";
1010
{{/if}}
1111
import prisma from "@{{projectName}}/db";
1212

13-
export const auth = betterAuth<BetterAuthOptions>({
13+
export const auth = betterAuth({
1414
database: prismaAdapter(prisma, {
1515
{{#if (eq database "postgres")}}provider: "postgresql"{{/if}}
1616
{{#if (eq database "sqlite")}}provider: "sqlite"{{/if}}
@@ -67,7 +67,7 @@ export const auth = betterAuth<BetterAuthOptions>({
6767

6868
{{#if (eq orm "drizzle")}}
6969
{{#if (or (eq runtime "bun") (eq runtime "node") (eq runtime "none"))}}
70-
import { betterAuth, type BetterAuthOptions } from "better-auth";
70+
import { betterAuth } from "better-auth";
7171
import { drizzleAdapter } from "better-auth/adapters/drizzle";
7272
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
7373
import { expo } from "@better-auth/expo";
@@ -79,7 +79,7 @@ import { polarClient } from "./lib/payments";
7979
import { db } from "@{{projectName}}/db";
8080
import * as schema from "@{{projectName}}/db/schema/auth";
8181

82-
export const auth = betterAuth<BetterAuthOptions>({
82+
export const auth = betterAuth({
8383
database: drizzleAdapter(db, {
8484
{{#if (eq database "postgres")}}provider: "pg",{{/if}}
8585
{{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
@@ -135,7 +135,7 @@ export const auth = betterAuth<BetterAuthOptions>({
135135
{{/if}}
136136

137137
{{#if (eq runtime "workers")}}
138-
import { betterAuth, type BetterAuthOptions } from "better-auth";
138+
import { betterAuth } from "better-auth";
139139
import { drizzleAdapter } from "better-auth/adapters/drizzle";
140140
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
141141
import { expo } from "@better-auth/expo";
@@ -148,7 +148,7 @@ import { db } from "@{{projectName}}/db";
148148
import * as schema from "@{{projectName}}/db/schema/auth";
149149
import { env } from "cloudflare:workers";
150150

151-
export const auth = betterAuth<BetterAuthOptions>({
151+
export const auth = betterAuth({
152152
database: drizzleAdapter(db, {
153153
{{#if (eq database "postgres")}}provider: "pg",{{/if}}
154154
{{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
@@ -217,7 +217,7 @@ export const auth = betterAuth<BetterAuthOptions>({
217217
{{/if}}
218218

219219
{{#if (eq orm "mongoose")}}
220-
import { betterAuth, type BetterAuthOptions } from "better-auth";
220+
import { betterAuth } from "better-auth";
221221
import { mongodbAdapter } from "better-auth/adapters/mongodb";
222222
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
223223
import { expo } from "@better-auth/expo";
@@ -228,7 +228,7 @@ import { polarClient } from "./lib/payments";
228228
{{/if}}
229229
import { client } from "@{{projectName}}/db";
230230

231-
export const auth = betterAuth<BetterAuthOptions>({
231+
export const auth = betterAuth({
232232
database: mongodbAdapter(client),
233233
trustedOrigins: [
234234
process.env.CORS_ORIGIN || "",
@@ -279,7 +279,7 @@ export const auth = betterAuth<BetterAuthOptions>({
279279
{{/if}}
280280

281281
{{#if (eq orm "none")}}
282-
import { betterAuth, type BetterAuthOptions } from "better-auth";
282+
import { betterAuth } from "better-auth";
283283
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
284284
import { expo } from "@better-auth/expo";
285285
{{/if}}
@@ -288,7 +288,7 @@ import { polar, checkout, portal } from "@polar-sh/better-auth";
288288
import { polarClient } from "./lib/payments";
289289
{{/if}}
290290

291-
export const auth = betterAuth<BetterAuthOptions>({
291+
export const auth = betterAuth({
292292
database: "", // Invalid configuration
293293
trustedOrigins: [
294294
process.env.CORS_ORIGIN || "",

0 commit comments

Comments
 (0)