
Auth Setup
This covers OAuth setup for Google, GitHub, Apple, X, and custom providers, plus JWT lifetime tuning and post-login hooks. You get two tools: manage_oauth for provider config and manage_auth_config for everything else. The role model is clean: anonymous, end-user JWT, or service key, each with different RLS behavior. Auth hooks are fire-and-forget functions that run after login, useful for creating profile rows or sending welcome emails but not for returning data to users. Service keys bypass RLS entirely, so the usual warnings apply. The redirect URI format is strict and provider quirks are documented, which saves time when Apple only returns names once or X refuses to give you emails.
- GitHub stars
- 532
- last updated
- Jun 11, 2026
Install
$ npx -y skills add butterbase-ai/butterbase-skills --skill auth-setup --agent claude-codeInstalls into .claude/skills of the current project.
Files
Butterbase Auth Setup
Two umbrella tools cover end-user authentication:
manage_oauth— provider configuration (Google, GitHub, Apple, X, custom)manage_auth_config— auth hooks, JWT lifetimes, service key generation
For broad app build-out, see also butterbase-skills:build-app. This skill is the deep dive.
1. The role model
Every request runs under one of three database roles:
| Auth header | Role | current_user_id() | RLS |
|---|---|---|---|
| none | butterbase_anon | NULL | enforced; default deny |
End-user JWT (issued by manage_oauth or email login) | butterbase_user | user UUID | enforced |
Service key (bb_sk_*) | butterbase_service | NULL | bypassed |
Auth is what transforms a request into the right role. RLS is what filters the data. Both must be configured.
2. Configure an OAuth provider
Sponsors
Details
- Repository
- github.com/butterbase-ai/butterbase-skills
- Categories
- Frontend Development, Backend & APIs, Security, Git & Pull Requests, Rust
- License
- MIT
- First seen
- Jun 11, 2026
More from butterbase-ai/butterbase-skills
All 39- Build App
- Butterbase Skills
- Contributing
- Debug Rls
- Deploy Frontend
- Durable Objects
- Function Dev
- Integrations
- Journey
- Journey Agents
- Journey Ai
- Journey Auth
- Journey Deploy
- Journey Docs
- Journey Durable
- Journey Frontend
- Journey Functions
- Journey Idea
- Journey Plan
- Journey Preflight
- Journey Rag
- Journey Realtime
- Journey Rls
- Journey Schema