Files
better-auth/demo/nextjs
ririxi cb900f9594 feat(organization): support multiple permissions check (#2227)
* feat: remove the artificial resource limit so that code can check

Also change `permission` to `permissions` (clearer for end user). `permission` is left for backwards compatibility.

* docs: add examples for multiple perms checking

* refactor: check `permissions` first, then legacy one

* feat: use union types for `permission` & `permissions`

* fix: properly use union types

* fix: remove accidental `@deprecated` comment

* chore: lint

* fix test

* chore: add oneTimeToken plugin to client barrel exports (#2224)

* docs(expo): add id token usage

* feat(oauth2): override user info on provider sign-in (#2148)

* feat(oauth2): override user info on provider sign-in

* improve email verification handling

* resolve mrge

* fix(sso): update overrideUserInfo handling to use provider configuration

* fix param

* chore: change plugin interface middleware type (#2195)

* fix: delete from session table when stopImpersonate called (#2230)

* chore: fix active organization inferred type

* chore: fix admin test

---------

Co-authored-by: Bereket Engida <bekacru@gmail.com>
Co-authored-by: Wade Fletcher <3798059+wadefletch@users.noreply.github.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
2025-04-12 22:00:58 +03:00
..
2024-09-27 15:55:00 +03:00
2024-10-11 21:16:21 +03:00
2024-10-14 20:06:29 +03:00
2024-09-26 08:14:28 +03: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
2025-01-12 02:02:44 +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!