The best way to control Claude Code, Codex and more from any computer or phone

main
md 22 lines 820 Bytes
Rendered Raw
1 # Domain + better-auth on Cloudflare
2
3 Signs users in to a Domain Api with GitHub or Google through [better-auth](https://better-auth.com), with a [foldkit](https://foldkit.dev) UI. Companion to the [Sign in with better-auth](https://alchemy.run/domain/better-auth) page.
4
5 ## Run locally
6
7 ```sh
8 pnpm install
9 cd examples/cloudflare-domain-better-auth
10 cp .env.example .env # add your GitHub and Google OAuth credentials
11 bun alchemy dev
12 ```
13
14 `alchemy dev` prints the app's URL (`http://localhost:1338`). Register `<app url>/api/auth/callback/github` and `<app url>/api/auth/callback/google` as the callback URLs of your OAuth apps.
15
16 ## Test
17
18 ```sh
19 pnpm test
20 ```
21
22 The tests sign users in through a local OpenID Connect provider, then call the Api over HTTP with the session cookie. foldkit stories test the app's `update`.