Skip to content

PocketBase auth, minus the bloat.

OAuth2, 6-digit OTP, 6 locales with Arabic RTL, account linking, and MCP consent compiled into your Go binary. Measured at 37.2 MiB idle on Linux.

Go plugin, migrations, OTP, and OAuth 2.1
go get github.com/fcakyon/pbauth
  • Google
  • Microsoft
  • GitHub
  • Apple
  • Hugging Face
  • ChatGPT

Sign in

Don’t have an account?

Live React components from pocketbase-auth with an in-memory client.

Built to drop into existing PocketBase apps

Auth routes, migrations, and isolated React subpaths with zero external databases.

Explore OAuth 2.1 & MCP

Ready for MCP & OAuth 2.1 clients

pocketbase-auth/oauth

Issue scoped tokens, verify client metadata via CIMD, and ship branded consent plus one-click client onboarding without bloating your login bundle.

ClaudeChatGPTCodexVS CodeCursorT3 Code

Same-tab PKCE by default

Popups fail on mobile Safari and installed PWAs. pbauth redirects in the same tab with PKCE S256, a scoped HttpOnly state cookie, and a 60s single-use ticket.

code_challenge=S256HttpOnly cookie1-use ticket

Proof-verified account linking

Connect multiple Google, GitHub, or Apple logins to one PocketBase record using signed ownership proofs and explicit conflict merges.

OnBeforeOAuthCreate · OnAccountConnectRead guide

6 locales built in, including Arabic RTL

Click any locale to preview live copy and directionality. Split subpath imports ensure unused languages stay tree-shaken.

تسجيل الدخولdir="rtl"

أرسلنا رمزاً مكوّناً من 6 أرقام إلى ada@example.com.

Up and running in minutes

Switch between server, React UI, OAuth consent, or agent CLI setup.

Wire providers, 6-digit email OTP, and routes into PocketBase in five lines.

main.go
app := pocketbase.New()
pbauth.RegisterMigrations()
pbauth.Register(app, pbauth.Config{
	EmailAuth:          pbauth.EmailAuthFromEnv(),
	ExposeMethodsRoute: true,
})
log.Fatal(app.Start())

Idle memory by stack

Measured Linux VmRSS for PocketBase + pbauth beside typical self-hosted estimates.

PocketBase + pbauthMeasured
37.2 MiB

Measured Linux VmRSS · one 24.2 MiB Go binary + embedded SQLite

Better Auth + Postgres
130–300 MiB

Typical estimate · Node.js server + Postgres (80–150 MiB on SQLite)

Supabase self-hosted
1.5–3 GB

Typical estimate · idle Docker stack (4 GB recommended minimum)

Documentation