You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal: opt-in GitHub sign-in addon with a mock OAuth provider for dev and tests (Mockatoo) #1305
Would you accept an opt-in --addons mockatoo that adds GitHub sign-in to the Better Auth template, using a mock provider outside production? If yes, I'll open a PR. If not, no hard feelings.
Disclosure: I build Mockatoo, a free hosted mock OAuth provider. Its connector, @mockatoo/connect-better-auth, is a thin wrapper around Better Auth's own GitHub provider.
Why
The Better Auth template is email/password only today. Adding social sign-in usually means registering a GitHub OAuth app before the first dev run, and E2E tests can't sign in through real GitHub. With the addon:
Development and tests: sign-in goes through Mockatoo. No OAuth app or secrets needed; tests sign in with a Mockatoo test account.
Production: unchanged. Better Auth's normal GitHub provider, and the Mockatoo plugin isn't loaded.
// server auth template (only with --addons mockatoo)
+socialProviders: isProduction ? { github } : {},+plugins: isProduction ? [...] : [mockGitHub(github), ...],
// Next.js sign-in form
+<Button>Continue with GitHub</Button>
--addons mockatoo is opt-in. Defaults don't change.
GitHub env vars are @required=forEnv(production) in the Varlock schema.
Scope: Next.js frontend, Better Auth, non-Convex backends. Convex, native and other frontends are not covered.
Checks: bun run check, bun run build:cli and the CLI tests pass (with --timeout 30000; at the default 5s, one test times out on main too). In production mode, sign-in redirects to github.com.
Setup, for anyone trying the branch
Scaffold with --frontend next --auth better-auth --addons mockatoo.
Activity
tianhuil commentedon Nov 13, 2026
PR is up: #1306 (branch
mockatoo-dev-auth, 4 commits).