Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

feat: move auth and server helpers out of Next.js into a plain Node package

已关闭
#2,564 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃

调研方向

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 内容生成。

描述

[Area] Core [Type] Feature Needs Discussion

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/core auth behavior is unchanged for existing users.
  • Usage is documented for a non-Next.js server.
主要语言
TypeScript
星标
1.6k
派生
157
平均合并
1 天 1 小时
30 天内合并 PR
137

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

wpengine/faustjs 的其他 Issue

查看 wpengine/faustjs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。