fj auth login --fjord: support Fjord Account sign-in under SSO/OIDC (device-code/PKCE), not just credentials #218
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
fj auth login --fjordcannot sign in to a Fjord Account when the deployment uses SSO/OIDC (the prod strategy —GET /api/auth/statusreturns{"strategy":"oidc"}). It bails atsrc/cli/auth_login.rs:335:Consequence: all Fjord-Account commands are unusable under SSO — e.g.
fj instances(src/cli/instances.rs:66/74), and anything routed throughsrc/fjord/mod.rs. A Forgejo PAT is the only working path, and it only covers direct Forgejo ops, not Fjord-Account management. Since thefjCLI is a featured client on the fjord.sh Clients section, the Fjord-Account CLI story is currently half-broken for real (SSO) deployments.Ask
Implement an SSO/OIDC sign-in flow for
fj auth login --fjordso Fjord-Account commands work on OIDC deployments.GET /api/auth/statusfor the actual sign-in shape (the error text already points clients there)./oauth/device_authorization,/oauth/token, discovery doc?) and implement the supported one.fj auth login --fjord"; a refresh token from the OIDC grant should enable silent refresh — seesrc/cli/auth.rs:176).Files
src/cli/auth_login.rs(the--fjordflow + the SSO bail at ~L335),src/cli/auth.rs(session storage/refresh),src/fjord/mod.rs(Fjord-Account API client / 401 handling),src/cli/instances.rs(a consumer to smoke-test against).Acceptance
fj auth login --fjordcompletes against the prod (OIDC) deployment and a subsequentfj instancessucceeds. Tests for the new flow (mock the device/token endpoints). fmt + clippy -D + tests green. Not launch-blocking (PAT fallback works), but completes the CLI client story.