11{{ #if (eq orm " prisma" )}}
2- import { betterAuth } from "better-auth";
2+ import { betterAuth, type BetterAuthOptions } from "better-auth";
33import { prismaAdapter } from "better-auth/adapters/prisma";
44{{ #if (or (includes frontend " native-nativewind" ) (includes frontend " native-unistyles" ))}}
55import { expo } from "@better-auth/expo";
66{{ /if }}
77import prisma from "../db";
88
9- export const auth = betterAuth({
9+ export const auth = betterAuth< BetterAuthOptions > ({
1010 database: prismaAdapter(prisma, {
1111 {{ #if (eq database " postgres" )}} provider: "postgresql"{{ /if }}
1212 {{ #if (eq database " sqlite" )}} provider: "sqlite"{{ /if }}
@@ -37,15 +37,15 @@ export const auth = betterAuth({
3737
3838{{ #if (eq orm " drizzle" )}}
3939{{ #if (or (eq runtime " bun" ) (eq runtime " node" ))}}
40- import { betterAuth } from "better-auth";
40+ import { betterAuth, type BetterAuthOptions } from "better-auth";
4141import { drizzleAdapter } from "better-auth/adapters/drizzle";
4242{{ #if (or (includes frontend " native-nativewind" ) (includes frontend " native-unistyles" ))}}
4343import { expo } from "@better-auth/expo";
4444{{ /if }}
4545import { db } from "../db";
4646import * as schema from "../db/schema/auth";
4747
48- export const auth = betterAuth({
48+ export const auth = betterAuth< BetterAuthOptions > ({
4949 database: drizzleAdapter(db, {
5050 {{ #if (eq database " postgres" )}} provider: "pg",{{ /if }}
5151 {{ #if (eq database " sqlite" )}} provider: "sqlite",{{ /if }}
@@ -75,7 +75,7 @@ export const auth = betterAuth({
7575{{ /if }}
7676
7777{{ #if (eq runtime " workers" )}}
78- import { betterAuth } from "better-auth";
78+ import { betterAuth, type BetterAuthOptions } from "better-auth";
7979import { drizzleAdapter } from "better-auth/adapters/drizzle";
8080{{ #if (or (includes frontend " native-nativewind" ) (includes frontend " native-unistyles" ))}}
8181import { expo } from "@better-auth/expo";
@@ -84,7 +84,7 @@ import { db } from "../db";
8484import * as schema from "../db/schema/auth";
8585import { env } from "cloudflare:workers";
8686
87- export const auth = betterAuth({
87+ export const auth = betterAuth< BetterAuthOptions > ({
8888 database: drizzleAdapter(db, {
8989 {{ #if (eq database " postgres" )}} provider: "pg",{{ /if }}
9090 {{ #if (eq database " sqlite" )}} provider: "sqlite",{{ /if }}
@@ -117,14 +117,14 @@ export const auth = betterAuth({
117117{{ /if }}
118118
119119{{ #if (eq orm " mongoose" )}}
120- import { betterAuth } from "better-auth";
120+ import { betterAuth, type BetterAuthOptions } from "better-auth";
121121import { mongodbAdapter } from "better-auth/adapters/mongodb";
122122{{ #if (or (includes frontend " native-nativewind" ) (includes frontend " native-unistyles" ))}}
123123import { expo } from "@better-auth/expo";
124124{{ /if }}
125125import { client } from "../db";
126126
127- export const auth = betterAuth({
127+ export const auth = betterAuth< BetterAuthOptions > ({
128128 database: mongodbAdapter(client),
129129 trustedOrigins: [
130130 process.env.CORS_ORIGIN || "",
@@ -149,12 +149,12 @@ export const auth = betterAuth({
149149{{ /if }}
150150
151151{{ #if (eq orm " none" )}}
152- import { betterAuth } from "better-auth";
152+ import { betterAuth, type BetterAuthOptions } from "better-auth";
153153{{ #if (or (includes frontend " native-nativewind" ) (includes frontend " native-unistyles" ))}}
154154import { expo } from "@better-auth/expo";
155155{{ /if }}
156156
157- export const auth = betterAuth({
157+ export const auth = betterAuth< BetterAuthOptions > ({
158158 database: "", // Invalid configuration
159159 trustedOrigins: [
160160 process.env.CORS_ORIGIN || "",
0 commit comments