Skip to main content

thunderid-integrate-nextjs

Add ThunderID authentication to a Next.js application using the official @thunderid/nextjs SDK. Use when asked to "integrate ThunderID into Next.js", "add auth to my Next.js app", or "connect ThunderID with Next.js".

跳到安装

来源信息

仓库
thunder-id/skills
最近来源活动
2026年8月18日 16:31
检测到的 SKILL.md 语言
英语
星标
35
分支
8

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
thunderid-integrate-nextjs
description
Add ThunderID authentication to a Next.js application using the official @thunderid/nextjs SDK. Use when asked to "integrate ThunderID into Next.js", "add auth to my Next.js app", or "connect ThunderID with Next.js".
license
Apache-2.0
allowed-tools
WebFetch, Bash(npm:*), Bash(npx:*), Bash(pnpm:*), Bash(yarn:*), Bash(bun:*), Read, Write, Edit
metadata
{"author":"thunderid","version":"1.0.0"}
# ThunderID — Next.js Integration Assumes ThunderID is running at `https://localhost:8090`. If not, run `/thunderid-install` first. Fetch the canonical, always-current integration guide before writing any code: WebFetch `https://thunderid.dev/docs/v1.0.x/getting-started/connect-your-application/nextjs.md` Follow that guide end to end — creating the Console application, installing `@thunderid/nextjs`, adding `ThunderIDProvider` and the proxy/middleware, adding sign-in/sign-up UI, and verifying the app runs — adapting file names, paths, and code style to this project's actual structure rather than copying the doc's file layout verbatim. You do not have Console access or a browser tool. Whenever a step needs a Console UI action (creating the application, choosing a sign-in approach, copying a Client ID/Secret/Application ID, adding a redirect URI), tell the user exactly what to click and ask them to report the value back — one value at a time, confirming each before asking for the next. If the guide presents more than one configuration or sign-in approach, use the `AskUserQuestion` tool to let the user choose rather than guessing which one this project wants. If the fetch fails (offline, docs unreachable), tell the user and give them the URL above to open manually. Do not improvise integration steps from memory. ## Project-specific notes - Detect the package manager from lockfiles: `pnpm-lock.yaml` → `pnpm add`, `yarn.lock` → `yarn add`, `bun.lockb` → `bun add`, else `npm install`. - Generate any session-signing secret the guide asks for with `openssl rand -base64 32`. ## Troubleshooting - **Certificate error** — Visit `https://localhost:8090` in your browser and accept the warning once. - **`invalid_client`** — Double-check the Client ID/Client Secret in `.env.local` against the application's General tab.
在 GitHub 查看