fcakyon/claude-codex-settings / plugins/reusable-app-components/skills/app-auth
app-auth
VerifiedThis skill should be used when the user asks to build, design, add, refactor or fix "login", "auth", "authentication", "social login", "sign in", "signup", "password recovery", "remember last login", "switch accounts", or a "reusable login component", including Google, GitHub, Apple, Hugging Face and PocketBase auth. Use the shared login design, bundled SVG logos, same-tab social sign-in, remembered profiles and email forms, with framework-neutral TypeScript contracts, React components and a Vite demo. Native and TV flows remain integration contracts.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.2 KB |
| assets/AuthPanel.tsx | other | 728 B |
| assets/EmailAuth.tsx | other | 8.7 KB |
| assets/GoogleSignIn.tsx | other | 3.3 KB |
| assets/ProviderLogo.tsx | other | 551 B |
| assets/RememberedLogin.tsx | other | 1.5 KB |
| assets/SocialSignIn.tsx | other | 1.1 KB |
| assets/auth-panel.css | other | 3.1 KB |
| assets/auth.ts | script | 884 B |
| assets/email-auth.css | other | 2.9 KB |
| assets/fonts/InterVariable.woff2 | binary | 344.0 KB |
| assets/fonts/OFL.txt | markdown | 4.3 KB |
| assets/google-sign-in.css | other | 840 B |
| assets/login.ts | script | 847 B |
| assets/logos.d.ts | script | 68 B |
| assets/logos/apple.svg | other | 650 B |
| assets/logos/github.svg | other | 822 B |
| assets/logos/google.svg | other | 742 B |
| assets/logos/huggingface.svg | other | 4.5 KB |
| assets/pocketbase.ts | script | 719 B |
| assets/social-sign-in.css | other | 1.3 KB |
| references/backend-standard.md | markdown | 5.1 KB |
| references/integration.md | markdown | 20.3 KB |
| references/journeys.md | markdown | 4.8 KB |
| references/platforms.md | markdown | 7.1 KB |
| references/provenance.md | markdown | 4.1 KB |
references/backend-standard.md
View on GitHub# Proposed PocketBase + Go app standard
Status: future architecture target. This plugin supplies no shared Go runtime, config generator or completed database migration yet.
Use Next.js/React plus one PocketBase-backed Go service per app when a single-node SQLite deployment fits. Keep users, databases, secrets, domains and authorization separate. Share behavior through a versioned runtime library, with recipes and evidence in this plugin. The plugin must not become a production runtime dependency.
PocketBase is pre-1.0 with no full backward-compatibility guarantee. Pin versions, review migration notes and rehearse restoration. It is a useful default for these apps, not a fit for every future workload or availability requirement.
| Shared behavior | App-owned policy/configuration |
| --- | --- |
| Google verification, state, PKCE and nonce handling | Client registration, callback, domain and linking policy |
| Sessions, cookies, CSRF, logout and rate limits | Names, lifetimes, origins, roles, invitations and allowlists |
| Verification/reset mail and safe localized templates | Sender, reply-to, branding and app links |
| Migrations, health checks and backup verification | Collections, domain tables, indexes, buckets and retention |
| Build/deployment conventions | Project IDs, domains, ports, volumes, workers and resource sizes |
Use PocketBase's mail client and SMTP configuration for auth email instead of duplicating transports in Next and Go. Confirm sender verification and SPF/DKIM/DMARC. Use [email-design](../../email-design/SKILL.md) for the shared HTML/text theme while preserving app-specific wording, links and sender settings. Keep marketing consent separate. Share implementation without silently sharing credentials or introducing one cross-app mail queue.
Use the [common opaque-session contract](platforms.md#sessions) across clients. Browsers carry the session in HttpOnly, Secure cookies. Logout deletes the server session before clearing its cookie. This needs no Redis or browser refresh-token store.
PocketBase native API tokens are stateless and have no traditional server-session logout endpoint. They remain an internal or explicitly separate client contract, not the shared browser login mechanism. Do not expose a native-token route that bypasses app access rules. Migrate existing API tokens without silently invalidating or exposing them.
Move Orchestrator's Nodemailer transport into the shared Go mail path while preserving its per-user preferences, alert deduplication and record-after-success behavior. Test deliveries through a local mail sink before an authorized production mail check.
## OpenShip convention
Use a small common deployment profile plus app values. Keep a concrete, reviewable `openship.json` in each app. If a generator is introduced later, version it, make output deterministic and run `openship config validate` in CI. Avoid runtime dependence on a mutable remote template.
Standardize web/API/optional-worker service roles, app-specific persistent `pb_data`, explicit public ports, pinned runtimes, health checks and path-based auto-deploy. Keep secrets in the secret store. Preserve live project IDs, domains, volumes, bindings and GitHub App deployment paths during migration.
Fast Rational currently embeds its PocketBase Dockerfile, entrypoint and Google hook in an OpenShip app JSON. Move executable logic into tracked Go/source files and let deployment config describe how to build and run them. MyAIPatient already separates its web and PocketBase projects, while Orchestrator has a Tailscale sidecar and SSH-mounted collector access. Preserve those working bindings during adoption.
Choose one stack versus separate web/API projects explicitly. Do not move a live hostname or volume merely to make JSON identical. Collectors and GPU jobs remain app workloads rather than auth infrastructure.
## Adoption order
1. Inventory source, deployed configuration, auth policy, mail, data and clients.
2. Extract the smallest confirmed Go auth/session/mail behavior into a versioned library. Keep mature provider-library checks and test each dependency upgrade.
3. Adopt the login contract through current adapters. This can precede database migration.
4. Move backend ownership on disposable data, compare API/data results, test permissions and restore a backup.
5. Prepare isolated staging, a bounded ingestion pause, final copy, one-writer cutover and rollback. Obtain applicable production-cutover authorization.
6. Verify deployed revisions, session/denial/token/email flows and domain behavior, then delete replaced implementations.
For Orchestrator, preserve run IDs, lineage, compound metric keys, aggregates, alert deduplication and collector ownership. PocketBase auth collections plus Go-owned domain tables can retain indexed SQL without forcing every metric into a generic collection model. Remove frontend database writes when Go takes ownership. Do not interrupt training jobs for this migration.
Sources: [PocketBase stability](https://pocketbase.io/docs/), [authentication](https://pocketbase.io/docs/authentication/), [Go migrations](https://pocketbase.io/docs/go-migrations/), [production and backups](https://pocketbase.io/docs/going-to-production/).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |