feat: move auth and server helpers out of Next.js into a plain Node package
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- nextjs, nodejs, typescript
调研方向
Start by tracing the token exchange, refresh, cookie handling, and authenticated request code in @faustwp/core, including its Next.js API routes and next/headers usage. Compare the planned @wpengine/hwp-auth package with the faustwp/v1/authorize flow. Done means plain Node works without Next.js, existing @faustwp/core behavior is unchanged, and non-Next.js usage is documented.
由索引模型根据 Issue 内容生成。
描述
The token exchange, refresh, and cookie handling in @faustwp/core is tied to Next.js (API routes, next/headers, the Next request/response types). Code outside Next.js (Astro, SvelteKit, a plain Node service, a CLI) can't reuse it, so each one reimplements the faustwp/v1/authorize flow.
Proposal
Extract the framework-agnostic parts into a plain Node package with no Next.js dependency:
- Exchanging an authorization code or refresh token for tokens.
- Refreshing tokens and tracking expiry.
- Sending authenticated requests to WPGraphQL and REST.
@faustwp/core would then use this package and keep only the Next.js-specific glue. The roadmap's planned @wpengine/hwp-auth package looks like the right home, so this should line up with that work rather than add another package.
Acceptance
- The package runs in plain Node with no Next.js installed.
@faustwp/coreauth behavior is unchanged for existing users.- Usage is documented for a non-Next.js server.
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 157
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 137
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wpengine/faustjs 的其他 Issue
-
[Area] Core [Area] WordPress Plugin [Type] Feature
难度 5/5 一周以上 新手友好度 25/100
wpengine/faustjs#2679 · 1 条评论 ·
维护者通常 1 天内回复
-
Apollo Client 4 SPIKE可能已有人在做 @josephfusco 于 2 天前认领。 未关闭[Area] Core dependencies
难度 5/5 一周以上 新手友好度 25/100
wpengine/faustjs#2192 · 5 个 reaction ·
维护者通常 1 天内回复
-
[Area] Core [Area] WordPress Plugin [Type] Bug Close Candidate Needs Reproduction
难度 4/5 3-5 天 新手友好度 35/100
wpengine/faustjs#1933 · 1 条评论 ·
维护者通常 1 天内回复
-
[Area] Core [Type] Bug Close Candidate Needs Reproduction Needs Triage
难度 3/5 1-2 天 新手友好度 35/100
wpengine/faustjs#1531 · 3 条评论 · 3 个 reaction ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
LogicLabs-OU/OpenArchiver#509 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
bigcapitalhq/bigcapital#1545 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复