Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/beige-clouds-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": patch
---

fix #1903 #2157 #2163
2 changes: 1 addition & 1 deletion cli/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const runCli = async (): Promise<CliResults> => {
)
/** @experimental - Used for CI E2E tests. Used in conjunction with `--CI` to skip prompting. */
.option(
"-i, --import-alias",
"-i, --import-alias [alias]",
"Explicitly tell the CLI to use a custom import alias",
defaultOptions.flags.importAlias
)
Expand Down
1 change: 1 addition & 0 deletions cli/template/base/_gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/prisma/db.sqlite
/prisma/db.sqlite-journal
db.sqlite
/generated/

# next.js
/.next/
Expand Down
3 changes: 3 additions & 0 deletions cli/template/extras/src/server/better-auth/config/base.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { betterAuth } from "better-auth";
import { nextCookies } from "better-auth/next-js";

export const auth = betterAuth({
emailAndPassword: {
enabled: true,
},
// Make sure nextCookies() is the last plugin in the array
plugins: [nextCookies()],
});

export type Session = typeof auth.$Infer.Session;
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { nextCookies } from "better-auth/next-js";

import { env } from "~/env";
import { db } from "~/server/db";
Expand All @@ -18,6 +19,8 @@ export const auth = betterAuth({
redirectURI: "http://localhost:3000/api/auth/callback/github",
},
},
// Make sure nextCookies() is the last plugin in the array
plugins: [nextCookies()],
});

export type Session = typeof auth.$Infer.Session;
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { betterAuth } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma";
import { nextCookies } from "better-auth/next-js";

import { env } from "~/env";
import { db } from "~/server/db";
Expand All @@ -18,6 +19,8 @@ export const auth = betterAuth({
redirectURI: "http://localhost:3000/api/auth/callback/github",
},
},
// Make sure nextCookies() is the last plugin in the array
plugins: [nextCookies()],
});

export type Session = typeof auth.$Infer.Session;