auth-setup

Solid

Use when configuring OAuth providers (Google/GitHub/Apple/X/etc.), setting up post-login auth hooks, tuning JWT lifetimes, or generating service API keys

API & Backend 424 stars 40 forks Updated today MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
88
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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 / provider_metadata are auto-filled for built-in providers }) ``` **Built-in providers (URLs and scopes pre-filled):** `google`, `github`, `discord`, `facebook`, `linkedin`, `microsoft`, `apple`, `x`. **Custom providers:** pass `authorization_url`, `token_url`, `userinfo_url`, ...

Details

Author
butterbase-ai
Repository
butterbase-ai/butterbase-skills
Created
1 months ago
Last Updated
today
Language
N/A
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Solid

journey-auth

Use as the auth build stage of the Butterbase journey, after journey-schema (and rls if separate). Implements the Auth section of 02-plan.md by delegating to auth-setup. Calls manage_oauth (configure) for providers and optionally manage_auth_config (configure_auth_hook, update_jwt). Skipped if the plan has no end-user auth.

424 Updated today
butterbase-ai
API & Backend Listed

authentication

Auth flows, session management, OAuth integration, domain-restricted access, and role-based access control for TopNetworks properties. Primary implementation is Better Auth 1.x with Google OAuth in route-genius. Use when implementing login, session checks, protected routes, or any access control logic.

43 Updated 3 months ago
diegosouzapw
API & Backend Listed

authentication

Auth flows, session management, OAuth integration, domain-restricted access, and role-based access control for TopNetworks properties. Primary implementation is Better Auth 1.x with Google OAuth in route-genius. Use when implementing login, session checks, protected routes, or any access control logic.

0 Updated 3 months ago
juanjaragavi
API & Backend Listed

authentication-setup

Design and implement authentication and authorization systems. Use when setting up user login, JWT tokens, OAuth, session management, or role-based access control. Handles password security, token management, SSO integration.

335 Updated today
aiskillstore
API & Backend Listed

better-auth-setup

Production-ready Better Auth integration for fullstack projects. Covers both the backend (Bun + Hono + Drizzle + PostgreSQL) and the frontend reverse proxy architecture (Next.js, Cloudflare Workers, or any framework proxying auth requests to a separate backend). Sets up email/password auth, session cookies, OAuth providers (Google, GitHub), API key auth, organization/multi-tenant support, email verification, CORS, security headers, auth middleware, tenant context, proxy forwarding headers, dynamic baseURL with allowedHosts, cookie prefix handling, and test infrastructure — all in one pass with zero gotchas. Use this skill whenever setting up Better Auth, adding OAuth/social login, configuring a reverse proxy for auth, debugging redirect_uri_mismatch errors, fixing state_mismatch cookie issues, session cookies not persisting after OAuth callback, or when the user mentions Better Auth, OAuth proxy, auth setup, login, signup, session management, API keys, multi-tenant auth, or "session cookie not working".

1 Updated 2 days ago
fysoul17