diff --git a/docs/app/blog/[[...slug]]/page.tsx b/docs/app/blog/[[...slug]]/page.tsx index 7cf64d11c3..9b9ebbbb2a 100644 --- a/docs/app/blog/[[...slug]]/page.tsx +++ b/docs/app/blog/[[...slug]]/page.tsx @@ -22,6 +22,7 @@ import { BookIcon, GitHubIcon, XIcon } from "../_components/icons"; import { DiscordLogoIcon } from "@radix-ui/react-icons"; import { StarField } from "../_components/stat-field"; import Image from "next/image"; +import { BlogPage } from "../_components/blog-list"; const metaTitle = "Blogs"; const metaDescription = "Latest changes , fixes and updates."; @@ -33,6 +34,9 @@ export default async function Page({ params: Promise<{ slug?: string[] }>; }) { const { slug } = await params; + if (!slug) { + return ; + } const page = blogs.getPage(slug); if (!page) { notFound(); @@ -47,25 +51,27 @@ export default async function Page({
-
-
- - - + +
+
+ + + +
+

+ {title}{" "} +

-

- {title}{" "} -

-
+

{description}

@@ -185,7 +191,11 @@ export async function generateMetadata({ const page = blogs.getPage(slug); if (page == null) notFound(); const baseUrl = process.env.NEXT_PUBLIC_URL || process.env.VERCEL_URL; - const url = new URL(`${baseUrl}/release-og/${slug.join("")}.png`); + const url = new URL( + `${baseUrl?.startsWith("http") ? baseUrl : `https://${baseUrl}`}${ + page.data?.image + }`, + ); const { title, description } = page.data; return { @@ -195,7 +205,7 @@ export async function generateMetadata({ title, description, type: "website", - url: absoluteUrl(`blogs/${slug.join("")}`), + url: absoluteUrl(`blog/${slug.join("/")}`), images: [ { url: url.toString(), diff --git a/docs/app/blogs/page.tsx b/docs/app/blog/_components/blog-list.tsx similarity index 91% rename from docs/app/blogs/page.tsx rename to docs/app/blog/_components/blog-list.tsx index eebf0a915a..41b77785fe 100644 --- a/docs/app/blogs/page.tsx +++ b/docs/app/blog/_components/blog-list.tsx @@ -1,15 +1,14 @@ import { formatBlogDate } from "@/lib/blog"; import Link from "next/link"; import { blogs } from "@/lib/source"; -import { IconLink } from "../blog/_components/changelog-layout"; -import { GitHubIcon, BookIcon, XIcon } from "../blog/_components/icons"; -import { Glow } from "../blog/_components/default-changelog"; -import { StarField } from "../blog/_components/stat-field"; +import { IconLink } from "./changelog-layout"; +import { GitHubIcon, BookIcon, XIcon } from "./icons"; +import { Glow } from "./default-changelog"; +import { StarField } from "./stat-field"; import { DiscordLogoIcon } from "@radix-ui/react-icons"; -export default async function BlogPage() { +export async function BlogPage() { const posts = blogs.getPages(); - return (
diff --git a/docs/app/page.tsx b/docs/app/page.tsx index 059b28f283..0b73b761b1 100644 --- a/docs/app/page.tsx +++ b/docs/app/page.tsx @@ -34,24 +34,22 @@ export default async function HomePage() {
- Introducing{" "} - - Better Auth Infrastructure - + Announcing Our{" "} + $5M seed round | - Join the waitlist → + Read more → - Join the waitlist → + Read more →
diff --git a/docs/components/nav-bar.tsx b/docs/components/nav-bar.tsx index 4bdef9644a..6d5ac7e522 100644 --- a/docs/components/nav-bar.tsx +++ b/docs/components/nav-bar.tsx @@ -120,6 +120,10 @@ export const navMenu = [ name: "changelogs", path: "/changelogs", }, + { + name: "blogs", + path: "/blog", + }, { name: "community", path: "/community", diff --git a/docs/components/nav-mobile.tsx b/docs/components/nav-mobile.tsx index b660c89303..5df43f39d0 100644 --- a/docs/components/nav-mobile.tsx +++ b/docs/components/nav-mobile.tsx @@ -217,6 +217,10 @@ export const navMenu: { name: "changelogs", path: "/changelogs", }, + { + name: "blogs", + path: "/blog", + }, { name: "community", path: "/community", diff --git a/docs/content/blogs/seed-round.mdx b/docs/content/blogs/seed-round.mdx new file mode 100644 index 0000000000..72bb71fb87 --- /dev/null +++ b/docs/content/blogs/seed-round.mdx @@ -0,0 +1,35 @@ +--- +title: "Announcing our $5M seed round" +description: "We raised $5M seed led by Peak XV Partners" +date: 2025-06-24 +author: + name: "Bereket Engida" + avatar: "/blogs/bereket.png" + twitter: "john_doe" +image: "/blogs/seed-round.png" +tags: ["seed round", "authentication", "funding"] +--- + +## Announcing our $5M seed round + +We’re excited to share that Better Auth has raised a $5 million seed round led by Peak XV Partners (formerly Sequoia Capital India & SEA), with participation from Y Combinator, Chapter One, P1 Ventures, and a group of incredible investors and angels. + +This funding fuels the next phase of **Better Auth**. + +From the start we are obsessed with making it possible for developers to **own their auth**. To **democratize high quality authentication** and make rolling your own auth not just doable, but the obvious choice. + +It started with building the framework. Since then, we’ve seen incredible growth and support from the community. Thank you everyone for being part of this journey. It’s still early days, and there’s so much more to build. This funding will allow us to have more people invloved and to push the boundaries of what's possible. + +On top of the framework, we’re also building the infrastructure to cover the gaps we couldn't cover in the framework: + +* A unified dashboard to manage users and user analytics +* Enterprise-grade security: bot, abuse, and fraud protection +* Authentication Email and SMS service +* Fast, globally distributed session storage +* and more. + +[Join the waitlist](https://better-auth.build) to get early access to the infrastructure. + +And if you're excited about making auth accessible - we're hiring! + +Reach out to [jobs@better-auth.com](mailto:jobs@better-auth.com). \ No newline at end of file diff --git a/docs/public/blogs/seed-round.png b/docs/public/blogs/seed-round.png new file mode 100644 index 0000000000..022b758c2a Binary files /dev/null and b/docs/public/blogs/seed-round.png differ diff --git a/packages/better-auth/src/client/index.ts b/packages/better-auth/src/client/index.ts index cc45a1dd31..052fe755f5 100644 --- a/packages/better-auth/src/client/index.ts +++ b/packages/better-auth/src/client/index.ts @@ -1,4 +1,4 @@ -import type { BetterAuthPlugin } from "../types"; +import type { BetterAuthOptions, BetterAuthPlugin } from "../types"; import type { BetterAuthClientPlugin } from "./types"; export * from "./vanilla"; export * from "./query"; @@ -11,6 +11,10 @@ export const InferPlugin = () => { } satisfies BetterAuthClientPlugin; }; +export function InferAuth() { + return {} as O["options"]; +} + //@ts-expect-error export type * from "nanostores"; export type * from "@better-fetch/fetch"; diff --git a/packages/better-auth/src/client/types.ts b/packages/better-auth/src/client/types.ts index bd77027d7a..ff1449bafb 100644 --- a/packages/better-auth/src/client/types.ts +++ b/packages/better-auth/src/client/types.ts @@ -12,7 +12,7 @@ import type { } from "../types/helper"; import type { Auth } from "../auth"; import type { InferRoutes } from "./path-to-object"; -import type { Session, User } from "../types"; +import type { BetterAuthOptions, Session, User } from "../types"; import type { InferFieldsInputClient, InferFieldsOutput } from "../db"; export type AtomListener = { @@ -72,6 +72,7 @@ export interface ClientOptions { baseURL?: string; basePath?: string; disableDefaultFetchPlugins?: boolean; + $InferAuth?: BetterAuthOptions; } export type InferClientAPI = InferRoutes< diff --git a/packages/better-auth/src/client/vanilla.ts b/packages/better-auth/src/client/vanilla.ts index de49089336..592831606b 100644 --- a/packages/better-auth/src/client/vanilla.ts +++ b/packages/better-auth/src/client/vanilla.ts @@ -16,6 +16,7 @@ import type { BetterFetchResponse, } from "@better-fetch/fetch"; import type { BASE_ERROR_CODES } from "../error/codes"; +import type { InferRoutes } from "./path-to-object"; type InferResolvedHooks = O["plugins"] extends Array< infer Plugin @@ -89,5 +90,18 @@ export function createAuthClient