create-better-t-stack 3.0.8 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{{#if (eq orm "prisma")}}
|
|
2
|
-
import { betterAuth
|
|
2
|
+
import { betterAuth } from "better-auth";
|
|
3
3
|
import { prismaAdapter } from "better-auth/adapters/prisma";
|
|
4
4
|
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
5
5
|
import { expo } from "@better-auth/expo";
|
|
@@ -10,7 +10,7 @@ import { polarClient } from "./lib/payments";
|
|
|
10
10
|
{{/if}}
|
|
11
11
|
import prisma from "@{{projectName}}/db";
|
|
12
12
|
|
|
13
|
-
export const auth = betterAuth
|
|
13
|
+
export const auth = betterAuth({
|
|
14
14
|
database: prismaAdapter(prisma, {
|
|
15
15
|
{{#if (eq database "postgres")}}provider: "postgresql"{{/if}}
|
|
16
16
|
{{#if (eq database "sqlite")}}provider: "sqlite"{{/if}}
|
|
@@ -67,7 +67,7 @@ export const auth = betterAuth<BetterAuthOptions>({
|
|
|
67
67
|
|
|
68
68
|
{{#if (eq orm "drizzle")}}
|
|
69
69
|
{{#if (or (eq runtime "bun") (eq runtime "node") (eq runtime "none"))}}
|
|
70
|
-
import { betterAuth
|
|
70
|
+
import { betterAuth } from "better-auth";
|
|
71
71
|
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
|
72
72
|
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
73
73
|
import { expo } from "@better-auth/expo";
|
|
@@ -79,7 +79,7 @@ import { polarClient } from "./lib/payments";
|
|
|
79
79
|
import { db } from "@{{projectName}}/db";
|
|
80
80
|
import * as schema from "@{{projectName}}/db/schema/auth";
|
|
81
81
|
|
|
82
|
-
export const auth = betterAuth
|
|
82
|
+
export const auth = betterAuth({
|
|
83
83
|
database: drizzleAdapter(db, {
|
|
84
84
|
{{#if (eq database "postgres")}}provider: "pg",{{/if}}
|
|
85
85
|
{{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
|
|
@@ -135,7 +135,7 @@ export const auth = betterAuth<BetterAuthOptions>({
|
|
|
135
135
|
{{/if}}
|
|
136
136
|
|
|
137
137
|
{{#if (eq runtime "workers")}}
|
|
138
|
-
import { betterAuth
|
|
138
|
+
import { betterAuth } from "better-auth";
|
|
139
139
|
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
|
140
140
|
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
141
141
|
import { expo } from "@better-auth/expo";
|
|
@@ -148,7 +148,7 @@ import { db } from "@{{projectName}}/db";
|
|
|
148
148
|
import * as schema from "@{{projectName}}/db/schema/auth";
|
|
149
149
|
import { env } from "cloudflare:workers";
|
|
150
150
|
|
|
151
|
-
export const auth = betterAuth
|
|
151
|
+
export const auth = betterAuth({
|
|
152
152
|
database: drizzleAdapter(db, {
|
|
153
153
|
{{#if (eq database "postgres")}}provider: "pg",{{/if}}
|
|
154
154
|
{{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
|
|
@@ -217,7 +217,7 @@ export const auth = betterAuth<BetterAuthOptions>({
|
|
|
217
217
|
{{/if}}
|
|
218
218
|
|
|
219
219
|
{{#if (eq orm "mongoose")}}
|
|
220
|
-
import { betterAuth
|
|
220
|
+
import { betterAuth } from "better-auth";
|
|
221
221
|
import { mongodbAdapter } from "better-auth/adapters/mongodb";
|
|
222
222
|
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
223
223
|
import { expo } from "@better-auth/expo";
|
|
@@ -228,7 +228,7 @@ import { polarClient } from "./lib/payments";
|
|
|
228
228
|
{{/if}}
|
|
229
229
|
import { client } from "@{{projectName}}/db";
|
|
230
230
|
|
|
231
|
-
export const auth = betterAuth
|
|
231
|
+
export const auth = betterAuth({
|
|
232
232
|
database: mongodbAdapter(client),
|
|
233
233
|
trustedOrigins: [
|
|
234
234
|
process.env.CORS_ORIGIN || "",
|
|
@@ -279,7 +279,7 @@ export const auth = betterAuth<BetterAuthOptions>({
|
|
|
279
279
|
{{/if}}
|
|
280
280
|
|
|
281
281
|
{{#if (eq orm "none")}}
|
|
282
|
-
import { betterAuth
|
|
282
|
+
import { betterAuth } from "better-auth";
|
|
283
283
|
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
|
284
284
|
import { expo } from "@better-auth/expo";
|
|
285
285
|
{{/if}}
|
|
@@ -288,7 +288,7 @@ import { polar, checkout, portal } from "@polar-sh/better-auth";
|
|
|
288
288
|
import { polarClient } from "./lib/payments";
|
|
289
289
|
{{/if}}
|
|
290
290
|
|
|
291
|
-
export const auth = betterAuth
|
|
291
|
+
export const auth = betterAuth({
|
|
292
292
|
database: "", // Invalid configuration
|
|
293
293
|
trustedOrigins: [
|
|
294
294
|
process.env.CORS_ORIGIN || "",
|