configuring-better-auth
設定 Better Auth OAuth 與 OIDC SSO
OAuth/OIDC 設定在驗證伺服器、用戶端、權杖儲存和重新導向等環節都容易出錯。此技能會引導 Better Auth 伺服器與 Next.js SSO 用戶端設定,涵蓋 PKCE、JWKS、重新整理、登出和電子郵件驗證模式。
安裝前請停止並請求確認。
請審查安裝計畫,並在變更檔案前取得使用者明確同意。
使用我的智慧代理安裝
將此請求複製給你的智慧代理,其中包含權威 Skill 頁面和清單。
Review the Skillstore skill "configuring-better-auth" from https://skillstore.io/skills/asmayaseen-configuring-better-auth.md and its manifest at https://skillstore.io/api/skills/asmayaseen-configuring-better-auth/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.你的智慧代理仍應顯示其計畫,並依安全政策請求必要確認。
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「configuring-better-auth」。 我需要為三個內部 Next.js 應用程式設定 SSO。
預期結果:
- 建議的驗證伺服器與用戶端架構。
- 基於 PKCE 的用戶端註冊計畫。
- redirect URI、權杖到期、JWKS 和 logout 檢查清單。
正在使用「configuring-better-auth」。 我的 OAuth callback 可以運作,但權杖過期後 token refresh 失敗。
預期結果:
- 在 refresh 路由中應檢查的可能原因。
- Cookie 和 refresh-token 處理檢查。
- 可實作的更安全伺服器端 refresh 流程。
正在使用「configuring-better-auth」。 在生產前審查這個 Better Auth 設定。
預期結果:
- 依權杖儲存、重新導向、PKCE、JWKS 和電子郵件驗證分組的安全發現。
- 針對每個高風險模式的具體修正步驟。
- 最終部署就緒檢查清單。
安全審計
高風險Static results were dominated by false positives from Markdown, template literals, normal environment configuration, and expected OAuth network operations. Three findings remain confirmed: two remote MCP trust-boundary references and disabled signing-key encryption. Semantic review found serious flaws in token storage, state validation, JWT validation, redirects, cookies, and route protection.
已確認的安全問題 (8)
能力複核項目 (2)
這些是真實的本機能力,對此技能而言可能是預期行為,因此需要複核,但不會按已確認的惡意行為計分。
風險因素
⚙️ 外部命令 (50)
🌐 網路存取 (50)
🔑 環境變數 (50)
分享與引用此報告
分享版本化評估報告、中性徽章、嵌入卡片與引用。Skillstore 只報告證據,不判斷該 Skill 是否安全。
複製報告連結
https://skillstore.io/skills/asmayaseen-configuring-better-auth/audits/9?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/asmayaseen-configuring-better-auth?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/asmayaseen-configuring-better-auth?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/asmayaseen-configuring-better-auth/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/asmayaseen-configuring-better-auth.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>學術引用 (APA · BibTeX · CFF)
APA 引用
Asmayaseen. (2026). configuring-better-auth security audit report (audit version 9) [Author version unspecified]. Skillstore. https://skillstore.io/skills/asmayaseen-configuring-better-auth/audits/9BibTeX 引用
@techreport{asmayaseen-asmayaseen-configuring-better-auth-2026,
author = {Asmayaseen},
title = {configuring-better-auth security audit report (audit version 9)},
institution = {Skillstore},
year = {2026},
number = {9},
url = {https://skillstore.io/skills/asmayaseen-configuring-better-auth/audits/9},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "configuring-better-auth security audit report (audit version 9)"
version: "unspecified"
type: report
authors:
- name: "Asmayaseen"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/asmayaseen-configuring-better-auth/audits/9"
identifiers:
- type: other
value: "skillstore:asmayaseen-configuring-better-auth:audit:9"
description: "Skillstore immutable audit report identifier"
Skillstore 評分
評分依據 證據置信度: 中你可以打造什麼
規劃共用驗證伺服器
為多個應用程式設計 Better Auth 伺服器,涵蓋 OIDC、PKCE、用戶端註冊和同意決策。
為 Next.js 應用程式新增 SSO
為 Next.js 用戶端應用程式實作 login、callback、session、refresh 和 logout 路由。
審查 OAuth 安全缺口
在生產前檢查 redirect URI 處理、權杖儲存、JWKS 驗證、refresh 流程和 logout 行為。
試試這些提示
使用此技能為兩個 Next.js 應用程式規劃 Better Auth OAuth/OIDC 設定。先詢問缺少的架構細節。
使用此技能概述 Better Auth OIDC provider 設定、PKCE 用戶端設定、JWKS 設定和電子郵件驗證選項。
使用此技能設計 Next.js SSO 用戶端路由,包含 login、callback、session、token refresh 和 global logout。
使用此技能審查現有 Better Auth SSO 流程中的權杖儲存、state 驗證、重新導向處理、JWKS 驗證和 logout 缺口。
最佳實務
- 公開用戶端使用 PKCE,並讓用戶端密鑰遠離瀏覽器程式碼。
- 可行時,將 bearer tokens 儲存在 httpOnly、Secure、SameSite cookies 中。
- 在信任權杖之前,先驗證 state、redirect URI、issuer、audience 和 JWKS 簽章。
避免
- 生產應用程式不要將 access 或 refresh tokens 儲存在 localStorage 中。
- 不要在 callback 路由中略過 OAuth state 驗證。
- 未經明確信任審查,不要新增第三方 MCP 伺服器。
常見問題
此技能可協助設定什麼?
它會建立完整的生產系統嗎?
它可以協助處理 token refresh 嗎?
它支援 Claude、Codex 和 Claude Code 嗎?
是否必須使用 Better Auth MCP 伺服器?
團隊在生產前應審查什麼?
開發者詳細資訊
作者
Asmayaseen授權
MIT
Skillstore 修訂
r2
版本提示
作者未聲明版本。
引用
89edfdc710d0846129dcee6a929477b04f08052c
維護新鮮度
2026/7/24
使用量
8 次下載 · 478 次瀏覽
檔案結構