Files
better-auth/demo/nextjs
Fraol Lemecha ac6baba2a0 chore: add changesets (#3557)
* chore: consistent package names

* chore: init changesets

* chore: update contribution doc to include generating a changeset

* chore: configure all better auth packages to always have the same version number

* chore: update nextjs demo package name

* chore(changesets): ignore all private packages

* chore(changesets): check for changesets in CI

* chore(changesets): install chagesets cli

* chore(changesets): use orgin as main

* chore(changesets): fix typo

* chore(changesets): check for changes since main in ci

* chore(changesets): check for changes since main in ci with the correct command

* chore(changesets): check against `origin/main`

* chore(changesets): checking for changesets should be the last action

* chore(changesets): run changelog check after stoping the docker containers

* chore(changesets): run changelog check after building

* chore(changesets): run changelog check after starting docker compose

* chore(changesets): run changelog check after linting

* chore(changesets): run changelog check after testing

* Revert "chore(changesets): run changelog check after testing"

This reverts commit 6dc000f78d30fa3622e37fc0d8699cc99ed868b6.

* chore: export siwe in better-auth/plugins (#3596)

The docs were using this import path, yet `siwe` wasn't exported there. This PR fixes this.

* chore: fix cookies test

* docs: make client-side vs. server-side explicit (#3603)

* docs: fix broken link to ERC-4361 in siwe docs (#3604)

* fix(jwt): ensure alg is added to the jwks when generating via /token endpoint (#3601)

* fix: Ensure alg is added to the jwks when generating via /token endpoint

* chore: resolve linting issues

* chore(example): fix SvelteKit example (#1742)

* refactor: upgrade Svelte, Vite and related packages

* refactor: replace no longer supported `body.callbackURL` with `onSuccess`

* fix: add missing `svelte-kit sync` on `prepare`

* fix: add missing `import`s

* chore(svelte-kit-example): show message & redirect to index after sign up

* chore: add npm script to migrate database

* doc: add more commands to set up

* chore: explicitly disable verification email on sign up

The example does not work if you set `sendOnSignUp: true` without setting up the email server.

* refactor(svelte-kit-example): add type for hooks

* chore(svelte-kit-example): redirect to sign in page if users open dashboard without log in

* chore: diable some rules for svelte-kit-example due to Biome's limited Svelte support

* style: fix format

* chore: update pnpm-lock.yaml

* chore: fix lock file

---------

Co-authored-by: Bereket Engida <Bekacru@gmail.com>

* fix: make sveltekit plugin ALS-agnostic (#3533)

* svelte cookie

* udpate

* update

* update

* update

* chore(cli): update zod to v4 (#3618)

* fix: correct typo in freeTrial variable name in Stripe integration

* chore: fix lock file

* chore: add changeset for typo fix in freeTrial

---------

Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
Co-authored-by: Bereket Engida <Bekacru@gmail.com>
Co-authored-by: Justin <127172022+jl33-ai@users.noreply.github.com>
Co-authored-by: Elliott Minns <elliott.minns@pm.me>
Co-authored-by: Jumpei Ogawa <git@phanective.org>
Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
2025-07-25 20:39:44 -07:00
..
2025-05-31 00:22:02 -07:00
2024-10-11 21:16:21 +03:00
2024-10-14 20:06:29 +03:00
2025-07-25 20:39:44 -07:00
2024-09-26 08:14:28 +03:00
2025-03-26 09:49:43 +03:00
2024-09-26 08:14:28 +03:00

Better Auth Demo App

Welcome to the Better Auth demo app! This project is built with Next.js using create-next-app.

Getting Started

Heres how you can get the app running locally:

Prerequisites

  1. Clone the repo:

    git clone https://github.com/better-auth/better-auth
    cd better-auth/demo/nextjs
    
  2. Install the dependencies:

    npm install
    # or
    yarn install
    # or
    pnpm install
    
  3. Set up your environment variables:

    • Rename the .env.example file to .env:

      mv .env.example .env
      
    • Open .env and fill in the required details. These will include things like API URLs, client IDs, and secrets needed to connect to the Better Auth service.

Start the Development Server

Once everything is set up, start the development server with:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

The app will be live at http://localhost:3000. Open it in your browser, and youre good to go!

Feel free to jump in and edit the app by modifying app/page.tsx. Any changes you make will update automatically in the browser.

Features

Heres what this app supports out of the box:

Learn More

Here are some helpful links if you want to dive deeper:


If you run into issues or have suggestions, feel free to open an issue or submit a pull request on the GitHub repo.

Happy coding!