Add authentication endpoint

未关闭
#599 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@Tanu1201 已经在做这个了。

开始于 2024年5月14日。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
next.js, typescript, wordpress

调研方向

首先定位 Headstart WP 插件中现有的 JWT 令牌生成类和 REST 端点注册代码。定义所请求的令牌过期配置和可过滤的响应数据,然后确定所需的 Next.js 集成文档以及应如何测试该端点。

由索引模型根据 Issue 内容生成。

描述

Is your enhancement related to a problem? Please describe.

A HeadstartWP-based project I'm working on requires a way to authenticate WordPress users within the Next.js app. While an additional third-party plugin such as JWT Authentication for WP REST API can be added for this purpose, the Headstart WP plugin already has a class for generating JWT tokens, so I propose adding an authentication REST endpoint within the plugin.

The endpoint would need to support different expiration times for the token (configurable perhaps via a filter), and the data returned from the REST endpoint should be filterable to provide any other user-specific data needed in the Next.js application such as roles, etc.

For the Next.js side of things, it may be sufficient for this repo to provide documentation for the integration.

Designs

No response

Describe alternatives you've considered

It's also an option to use a third-party plugin to provide an authentication endpoint.

Code of Conduct
  • I agree to follow this project's Code of Conduct
主要语言
TypeScript
星标
204
派生
26
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

10up/headstartwp 的其他 Issue

查看 10up/headstartwp 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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