REST: sign in with a device code (pivotkit login, pivotkit token, curl/PowerShell)

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

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đá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
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, powershell

Hướng nghiên cứu

Start by reading the REST service's OAuth metadata handling, CLI command structure, and the “Server in 5 minutes” token instructions. The issue leaves a key design choice open: whether to provide documented curl/PowerShell steps or a REST endpoint, and calls for provider-specific checks across Authentik, Keycloak, and Microsoft Entra ID. Done means the chosen device flow supports token refresh and the setup guide offers the new login path.

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

Mô tả

area:server enhancement

I want people to use the REST service with curl or PowerShell without asking me for a token.

  • pivotkit login --url <server> reads the REST resource's metadata (/.well-known/oauth-protected-resource), runs the OAuth 2.0 device authorization grant against the server's issuer, and keeps the refresh token in the OS keychain (a 0600 file where there is none). pivotkit token prints a fresh access token: curl -H "Authorization: Bearer $(pivotkit token)".
  • The same without the CLI: documented curl/PowerShell steps (start the device flow, open the URL, poll for the token), or a small REST endpoint that does the device flow for the caller. Decide which.

To check per provider (in their current docs): Authentik (device code flow per brand, public client, device endpoint in discovery, per-application issuer, audience, refresh with offline_access); Keycloak (the per-client "OAuth 2.0 Device Authorization Grant" switch, audience mapper); Microsoft Entra ID (public client flows, devicecode endpoint, api://<app>/.default, v2 tokens, Conditional Access that may block device code, group overage). The "Server in 5 minutes" page's token step should then offer pivotkit login too.

Ngôn ngữ chính
JavaScript
Star
1
Fork
1
Merge trung bình
3 giờ 34 phút
Pull request đã merge (30 ngày)
213

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 eizedev/pivotkit

Tất cả issue của eizedev/pivotkit

Issue tương tự

Thêm issue về JavaScript

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.