better-auth-setup SKILL.md skillF
better-auth-setup from mjunaidca/mjs-agent-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add mjunaidca/mjs-agent-skills/better-auth-setup@git:20251221.f6c90d7Pins git:20251221.f6c90d7 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- F, 16 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- mjunaidca/mjs-agent-skills
- Path
docs/taskflow-vault/skills/engineering/better-auth-setup/SKILL.md- Versions recorded
- 1
- Latest version
- git:20251221.f6c90d7, committed Dec 21, 2025
- Size
- 18,126 bytes
- Repository stars
- 28
- License
- none declared
Guide implementation of OAuth 2.1 / OIDC authentication using Better Auth with the OIDC Provider plugin. Use this skill when setting up centralized authentication for multiple apps, implementing SSO across a platform, creating an OAuth authorization server, or integrating Better Auth as an identity provider. Covers PKCE for public clients, JWKS configuration, token management, email verification, and common pitfalls like preserving PKCE parameters during sign-in redirects.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Better Auth OAuth/OIDC Setup Skill
## Purpose
Guide implementation of OAuth 2.1 / OIDC authentication using Better Auth with the OIDC Provider plugin.
## When to Use
- Setting up centralized authentication for multiple apps
- Implementing SSO (Single Sign-On) across a platform
- Creating an OAuth authorization server
- Integrating Better Auth as an identity provider
## Key Questions to Ask
1. **Architecture**
- How many apps will use this auth server?
- Is this for first-party apps only or third-party OAuth clients too?
- Do you need dynamic client registration?
2. **Database**
- Which database? (Postgres recommended with Neon for serverless)
- Need user profiles beyond core auth fields?
3. **Features**
- Role-based access control needed?
- Admin dashboard for user management?
- Consent screen for third-party apps?
## Implementation Checklist
### 1. Auth Server Setup (Public Client with PKCE)
```typescript
// src/lib/auth.ts
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { oidcProvider } from "better-auth/plugins/oidc-provider";
import { admin } from "better-auth/plugins/admin";
…Read the whole file at its exact version.
How to install
mdr add mjunaidca/mjs-agent-skills/better-auth-setup@sha256:801c4fe7187014fbThe line at the top of this page pins the label git:20251221.f6c90d7, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_ge5l5ulqmyxy4vfo)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Dec 21, 2025.
Audit of the latest version
- FAIL, critical: No instruction to send local credentials anywhere (matched: send = process.env)
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (18126 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.
Source
mjunaidca/mjs-agent-skills · 28 stars · license none declared · pushed 2026-08-12 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_ge5l5ulqmyxy4vfo GET https://markdownregistry.com/api/v1/resolve?ref=mjunaidca/mjs-agent-skills/better-auth-setup GET https://markdownregistry.com/api/v1/blob/801c4fe7187014fb0db6668cba3ea0dff4021c1b29b802a5c87378861e6b0962
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.