mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
upgrade to tanstack start alpha devinxi
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{{#if (eq orm "prisma")}}
|
||||
import { betterAuth } from "better-auth";
|
||||
import { prismaAdapter } from "better-auth/adapters/prisma";
|
||||
{{#if (includes frontend "native")}}
|
||||
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
import { expo } from "@better-auth/expo";
|
||||
{{/if}}
|
||||
import prisma from "../../prisma";
|
||||
@@ -14,14 +14,14 @@ export const auth = betterAuth({
|
||||
{{#if (eq database "mongodb")}}provider: "mongodb"{{/if}}
|
||||
}),
|
||||
trustedOrigins: [
|
||||
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
|
||||
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
"my-better-t-app://",{{/if}}
|
||||
],
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
}
|
||||
|
||||
{{#if (includes frontend "native")}}
|
||||
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
,
|
||||
plugins: [expo()]
|
||||
{{/if}}
|
||||
@@ -31,7 +31,7 @@ export const auth = betterAuth({
|
||||
{{#if (eq orm "drizzle")}}
|
||||
import { betterAuth } from "better-auth";
|
||||
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
||||
{{#if (includes frontend "native")}}
|
||||
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
import { expo } from "@better-auth/expo";
|
||||
{{/if}}
|
||||
import { db } from "../db";
|
||||
@@ -45,14 +45,14 @@ export const auth = betterAuth({
|
||||
schema: schema,
|
||||
}),
|
||||
trustedOrigins: [
|
||||
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
|
||||
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
"my-better-t-app://",{{/if}}
|
||||
],
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
}
|
||||
|
||||
{{#if (includes frontend "native")}}
|
||||
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
,
|
||||
plugins: [expo()]
|
||||
{{/if}}
|
||||
@@ -62,7 +62,7 @@ export const auth = betterAuth({
|
||||
{{#if (eq orm "mongoose")}}
|
||||
import { betterAuth } from "better-auth";
|
||||
import { mongodbAdapter } from "better-auth/adapters/mongodb";
|
||||
{{#if (includes frontend "native")}}
|
||||
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
import { expo } from "@better-auth/expo";
|
||||
{{/if}}
|
||||
import { client } from "../db";
|
||||
@@ -70,14 +70,14 @@ import { client } from "../db";
|
||||
export const auth = betterAuth({
|
||||
database: mongodbAdapter(client),
|
||||
trustedOrigins: [
|
||||
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
|
||||
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
"my-better-t-app://",{{/if}}
|
||||
],
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
}
|
||||
|
||||
{{#if (includes frontend "native")}}
|
||||
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
,
|
||||
plugins: [expo()]
|
||||
{{/if}}
|
||||
@@ -86,21 +86,21 @@ export const auth = betterAuth({
|
||||
|
||||
{{#if (eq orm "none")}}
|
||||
import { betterAuth } from "better-auth";
|
||||
{{#if (includes frontend "native")}}
|
||||
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
import { expo } from "@better-auth/expo";
|
||||
{{/if}}
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: "", // Invalid configuration
|
||||
trustedOrigins: [
|
||||
process.env.CORS_ORIGIN || "",{{#if (includes frontend "native")}}
|
||||
process.env.CORS_ORIGIN || "",{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
"my-better-t-app://",{{/if}}
|
||||
],
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
}
|
||||
|
||||
{{#if (includes frontend "native")}}
|
||||
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
|
||||
,
|
||||
plugins: [expo()]
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user