Skip to content

hellocoop/better-auth-demo

Repository files navigation

Hellō Better Auth Demo

This is a sample application showcasing the @hellocoop/better-auth plugin - the fastest way to add identity to your application.

Setup

To run locally, you will need:

1. Clone this repository

https://github.com/hellocoop/better-auth-demo

How to clone a repository

You should now have a better-auth-demo directory on your machine with the contents of this repo.

2. Get your Hellō Client ID

Option 1: Quick CLI Setup

npx @hellocoop/quickstart

This will open your browser, log you into Hellō, prompt you for your app name, and output your client_id. Set HELLO_CLIENT_ID to this value in the third step.

Option 2: Web Console Setup

Visit console.hello.coop, log into Hellō and create your application and obtain your Client ID which is the HELLO_CLIENT_ID in the third step.

Option 3: MCP Setup

  1. Install the Hello Admin MCP Server for Cursor, VSCode, or if you are using another IDE, click here to find the install links.
  2. Run the prompt (This will open your browser and log you into Hellō.):
    Create a Hellō application named "Hellō Better Auth Demo", and use the logos in the "logos" directory to set the dark and light mode logo versions. Then, create a ".env" file based on ".env.example", and set the "CLIENT_ID" to the one from the newly created application.

Skip to step 4 since the MCP server will create the .env file with the CLIENT_ID for you!


The http://localhost* redirect URI is enabled by default, allowing you to immediately start development on your machine.

3. Set your Hellō Client ID

Copy the .env.example file at the root of this repo to .env and set the value of the HELLO_CLIENT_ID to what you got in the second step.

4. Install and run!

Run these commands to start running locally:

cd better-auth-demo
npm install
npm run dev

Open http://localhost:3000 (assuming port 3000 was free)

Click the [ō Continue with Hellō] button to log in. You will be redirected to the Hellō Wallet. If you have not added a logo or URLs, you will see placeholders.

Learn More

About

Next.js demo app showcasing the Better Auth plugin for Hellō

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published