diff --git a/demo/nextjs/components/features.tsx b/demo/nextjs/components/features.tsx
deleted file mode 100644
index abb6b2d5..00000000
--- a/demo/nextjs/components/features.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import { cn } from "@/lib/utils";
-import {
- IconAdjustmentsBolt,
- IconCloud,
- IconCurrencyDollar,
- IconEaseInOut,
- IconHeart,
- IconHelp,
- IconRouteAltLeft,
- IconTerminal2,
-} from "@tabler/icons-react";
-
-export function FeaturesSectionDemo() {
- const features = [
- {
- title: "Email & Password Login",
- description:
- "Sign & Signup with email and password",
- icon:
,
- },
- {
- title: "Passkey",
- description: "passkey implemntation"
- }
- ];
- return (
-
- {features.map((feature, index) => (
-
- ))}
-
- );
-}
-
-const Feature = ({
- title,
- description,
- icon,
- index,
-}: {
- title: string;
- description: string;
- icon: React.ReactNode;
- index: number;
-}) => {
- return (
-
- {index < 4 && (
-
- )}
- {index >= 4 && (
-
- )}
- {/*
- {icon}
-
*/}
-
-
- {description}
-
-
- );
-};
diff --git a/demo/nextjs/lib/metadata.ts b/demo/nextjs/lib/metadata.ts
new file mode 100644
index 00000000..5caab681
--- /dev/null
+++ b/demo/nextjs/lib/metadata.ts
@@ -0,0 +1,28 @@
+import type { Metadata } from "next/types";
+
+export function createMetadata(override: Metadata): Metadata {
+ return {
+ ...override,
+ openGraph: {
+ title: override.title ?? undefined,
+ description: override.description ?? undefined,
+ url: "https://demo.better-auth.com",
+ images: "https://demo.better-auth.com/og.png",
+ siteName: "Better Auth",
+ ...override.openGraph,
+ },
+ twitter: {
+ card: "summary_large_image",
+ creator: "@beakcru",
+ title: override.title ?? undefined,
+ description: override.description ?? undefined,
+ images: "https://demo.better-auth.com/og.png",
+ ...override.twitter,
+ },
+ };
+}
+
+export const baseUrl =
+ process.env.NODE_ENV === "development"
+ ? new URL("http://localhost:3000")
+ : new URL(`https://${process.env.VERCEL_URL!}`);
diff --git a/demo/nextjs/package.json b/demo/nextjs/package.json
index 52307ac7..b3b476e8 100644
--- a/demo/nextjs/package.json
+++ b/demo/nextjs/package.json
@@ -53,6 +53,7 @@
"date-fns": "^3.6.0",
"embla-carousel-react": "^8.2.1",
"framer-motion": "^11.5.4",
+ "geist": "^1.3.1",
"input-otp": "^1.2.4",
"kysely": "^0.27.4",
"lucide-react": "^0.439.0",
diff --git a/demo/nextjs/public/favicon/android-chrome-192x192.png b/demo/nextjs/public/favicon/android-chrome-192x192.png
new file mode 100644
index 00000000..45b1a90a
Binary files /dev/null and b/demo/nextjs/public/favicon/android-chrome-192x192.png differ
diff --git a/demo/nextjs/public/favicon/android-chrome-512x512.png b/demo/nextjs/public/favicon/android-chrome-512x512.png
new file mode 100644
index 00000000..6d2d953a
Binary files /dev/null and b/demo/nextjs/public/favicon/android-chrome-512x512.png differ
diff --git a/demo/nextjs/public/favicon/apple-touch-icon.png b/demo/nextjs/public/favicon/apple-touch-icon.png
new file mode 100644
index 00000000..1000536e
Binary files /dev/null and b/demo/nextjs/public/favicon/apple-touch-icon.png differ
diff --git a/demo/nextjs/public/favicon/favicon-16x16.png b/demo/nextjs/public/favicon/favicon-16x16.png
new file mode 100644
index 00000000..13f3ec81
Binary files /dev/null and b/demo/nextjs/public/favicon/favicon-16x16.png differ
diff --git a/demo/nextjs/public/favicon/favicon-32x32.png b/demo/nextjs/public/favicon/favicon-32x32.png
new file mode 100644
index 00000000..8e99d26a
Binary files /dev/null and b/demo/nextjs/public/favicon/favicon-32x32.png differ
diff --git a/demo/nextjs/public/favicon/favicon.ico b/demo/nextjs/public/favicon/favicon.ico
new file mode 100644
index 00000000..4ad7a8e6
Binary files /dev/null and b/demo/nextjs/public/favicon/favicon.ico differ
diff --git a/demo/nextjs/public/favicon/site.webmanifest b/demo/nextjs/public/favicon/site.webmanifest
new file mode 100644
index 00000000..95911504
--- /dev/null
+++ b/demo/nextjs/public/favicon/site.webmanifest
@@ -0,0 +1,19 @@
+{
+ "name": "",
+ "short_name": "",
+ "icons": [
+ {
+ "src": "/android-chrome-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "/android-chrome-512x512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }
+ ],
+ "theme_color": "#ffffff",
+ "background_color": "#ffffff",
+ "display": "standalone"
+}
diff --git a/demo/nextjs/public/file.svg b/demo/nextjs/public/file.svg
deleted file mode 100644
index 004145cd..00000000
--- a/demo/nextjs/public/file.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/demo/nextjs/public/globe.svg b/demo/nextjs/public/globe.svg
deleted file mode 100644
index 567f17b0..00000000
--- a/demo/nextjs/public/globe.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/demo/nextjs/public/logo.png b/demo/nextjs/public/logo.png
deleted file mode 100644
index e1cbf64d..00000000
Binary files a/demo/nextjs/public/logo.png and /dev/null differ
diff --git a/demo/nextjs/public/next.svg b/demo/nextjs/public/next.svg
deleted file mode 100644
index 5174b28c..00000000
--- a/demo/nextjs/public/next.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/demo/nextjs/public/og.png b/demo/nextjs/public/og.png
new file mode 100644
index 00000000..6ad62797
Binary files /dev/null and b/demo/nextjs/public/og.png differ
diff --git a/demo/nextjs/public/vercel.svg b/demo/nextjs/public/vercel.svg
deleted file mode 100644
index 77053960..00000000
--- a/demo/nextjs/public/vercel.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/demo/nextjs/public/window.svg b/demo/nextjs/public/window.svg
deleted file mode 100644
index b2b2a44f..00000000
--- a/demo/nextjs/public/window.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a0793ce9..3da083dc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -171,6 +171,9 @@ importers:
framer-motion:
specifier: ^11.5.4
version: 11.5.4(@emotion/is-prop-valid@0.8.8)(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)
+ geist:
+ specifier: ^1.3.1
+ version: 1.3.1(next@15.0.0-canary.157(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(babel-plugin-react-compiler@0.0.0)(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827))
input-otp:
specifier: ^1.2.4
version: 1.2.4(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)
@@ -842,145 +845,6 @@ importers:
specifier: ^5.5.4
version: 5.5.4
- examples/next-js:
- dependencies:
- '@hookform/resolvers':
- specifier: ^3.9.0
- version: 3.9.0(react-hook-form@7.52.2(react@18.3.1))
- '@libsql/kysely-libsql':
- specifier: ^0.4.1
- version: 0.4.1(kysely@0.27.4)
- '@radix-ui/react-avatar':
- specifier: ^1.1.0
- version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-checkbox':
- specifier: ^1.1.1
- version: 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-dialog':
- specifier: ^1.1.1
- version: 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-dropdown-menu':
- specifier: ^2.1.1
- version: 2.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-icons':
- specifier: ^1.3.0
- version: 1.3.0(react@18.3.1)
- '@radix-ui/react-label':
- specifier: ^2.1.0
- version: 2.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-select':
- specifier: ^2.1.1
- version: 2.1.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-separator':
- specifier: ^1.1.0
- version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-slot':
- specifier: ^1.1.0
- version: 1.1.0(@types/react@18.3.3)(react@18.3.1)
- '@radix-ui/react-switch':
- specifier: ^1.1.0
- version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-tabs':
- specifier: ^1.1.0
- version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-toggle':
- specifier: ^1.1.0
- version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@radix-ui/react-tooltip':
- specifier: ^1.1.2
- version: 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- '@tabler/icons-react':
- specifier: ^3.12.0
- version: 3.12.0(react@18.3.1)
- better-auth:
- specifier: workspace:*
- version: link:../../packages/better-auth
- better-call:
- specifier: ^0.1.0
- version: 0.1.38(typescript@5.5.4)
- better-sqlite3:
- specifier: ^11.1.2
- version: 11.1.2
- class-variance-authority:
- specifier: ^0.7.0
- version: 0.7.0
- clsx:
- specifier: ^2.1.1
- version: 2.1.1
- framer-motion:
- specifier: ^11.3.30
- version: 11.3.30(@emotion/is-prop-valid@0.8.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- input-otp:
- specifier: ^1.2.4
- version: 1.2.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- kysely:
- specifier: ^0.27.4
- version: 0.27.4
- lucide-react:
- specifier: ^0.435.0
- version: 0.435.0(react@18.3.1)
- mini-svg-data-uri:
- specifier: ^1.4.4
- version: 1.4.4
- next:
- specifier: 14.2.5
- version: 14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- next-themes:
- specifier: ^0.3.0
- version: 0.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- react:
- specifier: ^18
- version: 18.3.1
- react-dom:
- specifier: ^18
- version: 18.3.1(react@18.3.1)
- react-hook-form:
- specifier: ^7.52.2
- version: 7.52.2(react@18.3.1)
- react-qr-code:
- specifier: ^2.0.15
- version: 2.0.15(react@18.3.1)
- sonner:
- specifier: ^1.5.0
- version: 1.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- swr:
- specifier: ^2.2.5
- version: 2.2.5(react@18.3.1)
- tailwind-merge:
- specifier: ^2.5.0
- version: 2.5.2
- tailwindcss-animate:
- specifier: ^1.0.7
- version: 1.0.7(tailwindcss@3.4.10(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)))
- ua-parser-js:
- specifier: ^1.0.38
- version: 1.0.38
- zod:
- specifier: ^3.23.8
- version: 3.23.8
- devDependencies:
- '@types/node':
- specifier: ^20
- version: 20.14.12
- '@types/react':
- specifier: ^18
- version: 18.3.3
- '@types/react-dom':
- specifier: ^18
- version: 18.3.0
- '@types/ua-parser-js':
- specifier: ^0.7.39
- version: 0.7.39
- postcss:
- specifier: ^8
- version: 8.4.41
- tailwindcss:
- specifier: ^3.4.1
- version: 3.4.10(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))
- typescript:
- specifier: ^5
- version: 5.5.4
-
packages/better-auth:
dependencies:
'@babel/preset-react':
@@ -2763,7 +2627,7 @@ packages:
'@expo/bunyan@4.0.1':
resolution: {integrity: sha512-+Lla7nYSiHZirgK+U/uYzsLv/X+HaJienbD5AKX1UQZHYfWaP+9uuQluRB4GrEVWF0GZ7vEVp/jzaOT9k/SQlg==}
- engines: {node: '>=0.10.0'}
+ engines: {'0': node >=0.10.0}
'@expo/cli@0.18.29':
resolution: {integrity: sha512-X810C48Ss+67RdZU39YEO1khNYo1RmjouRV+vVe0QhMoTe8R6OA3t+XYEdwaNbJ5p/DJN7szfHfNmX2glpC7xg==}
@@ -9269,12 +9133,10 @@ packages:
libsql@0.3.19:
resolution: {integrity: sha512-Aj5cQ5uk/6fHdmeW0TiXK42FqUlwx7ytmMLPSaUQPin5HKKKuUPD62MAbN4OEweGBBI7q1BekoEN4gPUEL6MZA==}
- cpu: [x64, arm64, wasm32]
os: [darwin, linux, win32]
libsql@0.4.5:
resolution: {integrity: sha512-sorTJV6PNt94Wap27Sai5gtVLIea4Otb2LUiAUyr3p6BPOScGMKGt5F1b5X/XgkNtcsDKeX5qfeBDj+PdShclQ==}
- cpu: [x64, arm64, wasm32]
os: [darwin, linux, win32]
lighthouse-logger@1.4.2:
@@ -23320,6 +23182,10 @@ snapshots:
dependencies:
next: 14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ geist@1.3.1(next@15.0.0-canary.157(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(babel-plugin-react-compiler@0.0.0)(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)):
+ dependencies:
+ next: 15.0.0-canary.157(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(babel-plugin-react-compiler@0.0.0)(react-dom@19.0.0-rc-7771d3a7-20240827(react@19.0.0-rc-7771d3a7-20240827))(react@19.0.0-rc-7771d3a7-20240827)
+
generate-function@2.3.1:
dependencies:
is-property: 1.0.2
@@ -26556,14 +26422,6 @@ snapshots:
camelcase-css: 2.0.1
postcss: 8.4.44
- postcss-load-config@4.0.2(postcss@8.4.44)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)):
- dependencies:
- lilconfig: 3.1.2
- yaml: 2.5.0
- optionalDependencies:
- postcss: 8.4.44
- ts-node: 10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)
-
postcss-load-config@4.0.2(postcss@8.4.44)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.6.2)):
dependencies:
lilconfig: 3.1.2
@@ -27183,12 +27041,6 @@ snapshots:
dependencies:
fast-deep-equal: 2.0.1
- react-qr-code@2.0.15(react@18.3.1):
- dependencies:
- prop-types: 15.8.1
- qr.js: 0.0.0
- react: 18.3.1
-
react-qr-code@2.0.15(react@19.0.0-rc-7771d3a7-20240827):
dependencies:
prop-types: 15.8.1
@@ -28398,10 +28250,6 @@ snapshots:
dependencies:
tailwindcss: 3.4.1(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@22.3.0)(typescript@5.5.4))
- tailwindcss-animate@1.0.7(tailwindcss@3.4.10(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))):
- dependencies:
- tailwindcss: 3.4.10(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))
-
tailwindcss-animate@1.0.7(tailwindcss@3.4.10(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.6.2))):
dependencies:
tailwindcss: 3.4.10(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.6.2))
@@ -28437,33 +28285,6 @@ snapshots:
transitivePeerDependencies:
- ts-node
- tailwindcss@3.4.10(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4)):
- dependencies:
- '@alloc/quick-lru': 5.2.0
- arg: 5.0.2
- chokidar: 3.6.0
- didyoumean: 1.2.2
- dlv: 1.1.3
- fast-glob: 3.3.2
- glob-parent: 6.0.2
- is-glob: 4.0.3
- jiti: 1.21.6
- lilconfig: 2.1.0
- micromatch: 4.0.7
- normalize-path: 3.0.0
- object-hash: 3.0.0
- picocolors: 1.0.1
- postcss: 8.4.44
- postcss-import: 15.1.0(postcss@8.4.44)
- postcss-js: 4.0.1(postcss@8.4.44)
- postcss-load-config: 4.0.2(postcss@8.4.44)(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4))
- postcss-nested: 6.2.0(postcss@8.4.44)
- postcss-selector-parser: 6.1.2
- resolve: 1.22.8
- sucrase: 3.35.0
- transitivePeerDependencies:
- - ts-node
-
tailwindcss@3.4.10(ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.6.2)):
dependencies:
'@alloc/quick-lru': 5.2.0
@@ -28721,27 +28542,6 @@ snapshots:
'@ts-morph/common': 0.24.0
code-block-writer: 13.0.2
- ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.5.4):
- dependencies:
- '@cspotcode/source-map-support': 0.8.1
- '@tsconfig/node10': 1.0.11
- '@tsconfig/node12': 1.0.11
- '@tsconfig/node14': 1.0.3
- '@tsconfig/node16': 1.0.4
- '@types/node': 20.14.12
- acorn: 8.12.1
- acorn-walk: 8.3.3
- arg: 4.1.3
- create-require: 1.1.1
- diff: 4.0.2
- make-error: 1.3.6
- typescript: 5.5.4
- v8-compile-cache-lib: 3.0.1
- yn: 3.1.1
- optionalDependencies:
- '@swc/core': 1.7.26(@swc/helpers@0.5.13)
- optional: true
-
ts-node@10.9.2(@swc/core@1.7.26(@swc/helpers@0.5.13))(@types/node@20.14.12)(typescript@5.6.2):
dependencies:
'@cspotcode/source-map-support': 0.8.1