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

Ouverte
#486 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
javascript, powershell

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
JavaScript
Étoiles
1
Forks
1
Merge moyen
3 h 34 min
PR mergées (30 j)
213

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de eizedev/pivotkit

Toutes les issues de eizedev/pivotkit

Issues similaires

Plus d'issues JavaScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.