Add authentication endpoint

Đang mở
#599 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

@Tanu1201 đang làm issue này rồi.

Từ ngày 14/5/2024.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
next.js, typescript, wordpress
Lĩnh vực
api, authentication, backend

Hướng nghiên cứu

Bắt đầu bằng cách xác định lớp hiện có dùng để tạo token JWT trong plugin Headstart WP và phần đăng ký REST endpoint. Xác định cấu hình thời hạn token được yêu cầu và dữ liệu phản hồi có thể lọc, sau đó xác định cần có tài liệu tích hợp Next.js nào và endpoint nên được kiểm thử như thế nào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
TypeScript
Star
204
Fork
26
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của 10up/headstartwp

Tất cả issue của 10up/headstartwp

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.