auth-setup
Use when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys
npx skills add butterbase-ai/butterbase-skills --skill auth-setup --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 ```js manage_oauth({ app_id: "app_abc123", action: "configure", provider: "google", client_id: "123456789.apps.googleusercontent.com", client_secret: "GOCSPX-...", redirect_uris: ["https://api.butterbase.ai/auth/app_abc123/oauth/google/callback"] // scopes / authorization_url / token_url / userinfo_url / pro
- 1. The role model
- 2. Configure an OAuth provider
- Redirect URI format
- Provider quirks
- List, update, delete
- Frontend flow
- 3. Tune JWT lifetimes
- 4. Auth hooks (run code after every login)
- Wire it up
- Payload shape
- Common uses
- 5. Service keys (bbsk)
- Generate
- List & revoke
What does the auth-setup skill do?
Use when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys
How do I install it?
Run `npx skills add butterbase-ai/butterbase-skills --skill auth-setup --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From butterbase-ai/butterbase-skills, a repository with 532 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.