Files
better-auth/docs
Maxwell dce44c697f docs(NextJS): Improve middleware example to be more secure (#3135)
* docs(NextJS): Improve middleware example to be more secure

Users can skim code without reading the text, and LLMs can read code and miss-understand context correctly.  Our current middleware example only checks for existence of a cookie, and doesn't validate it.

While we do warn users this isn't secure, some users has raised concern in a Github issue saying it's not obvious enough for users who skim.

Also we don't provide examples on how to authenticate users on each route, we only show middleware optimistic check examples.

* Update docs/content/docs/integrations/next.mdx

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-06-22 16:15:12 -07:00
..
2025-06-12 22:11:44 -07:00
2025-05-23 12:44:51 -07:00
2025-05-23 12:44:51 -07:00
2025-03-08 10:08:42 +03:00
2025-05-23 12:44:51 -07:00

Better Auth Docs

This is the documentation site for Better Auth.

Contributing

To contribute to the docs, you can clone the repo and run the docs site locally.

pnpm install
pnpm run dev

This will start the docs site on http://localhost:3000.