docs/content/docs/examples/react-router.mdx
This is an example of how to use Better Auth with React Router v7.
Implements the following features: Email & Password . Social Sign-in with Google . Passkeys . Email Verification . Password Reset . Two Factor Authentication . Profile Update . Session Management
<ForkButton url="better-auth/examples/tree/main/react-router-example" /> <iframe src="https://stackblitz.com/github/better-auth/examples/tree/main/react-router-example?codemirror=1&fontsize=14&hidedevtools=1&hidenavigation=1&runonclick=1" style={{ width: "100%", height: "500px", border: 0, borderRadius: "4px", overflow: "hidden" }} title="Better Auth React Router v7 Example" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts" />.env.example file and adding the variablespnpm install
pnpm run dev
http://localhost:3000