1jehuang / 1jehuang/jcode

Audit auth/login options end-to-end and rewrite the auth/login docs

Open
#386 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

autonomous: likely priority: medium triage: needs-decision
Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
30

Description

Goal

Make it easy and obvious for an agent to log in on behalf of the user. The end
state is great agent UX around auth: an agent should be able to figure out, with
confidence, how to authenticate the user for any supported provider without
guessing, and the docs should reflect exactly what the code does.

What to do

Comprehensively audit everything we have built in around authentication and
login, then rewrite the auth/login docs to match reality and serve agents well.
Treat the code as the source of truth and reconcile the docs and tests against
it. Be thorough; the point is to leave nothing undiscovered.

Areas to definitely review and think through

  • The full CLI surface for logging in and managing auth (commands, subcommands,
    flags, aliases, conflicts, and how they compose).
  • Every provider we support and how login works for each, including credential
    discovery order, where credentials are stored, and relevant env vars.
  • The scriptable / non-interactive login paths and their lifecycle, versus the
    flows that require an interactive terminal.
  • The credential-import / external-auth-source behavior and where it is gated.
  • The in-TUI login experience and whether it matches the CLI.
  • All existing auth/login tests, what they cover, and where coverage is thin.
  • Anywhere the current docs (e.g. OAUTH.md, README auth sections, telemetry
    notes) have drifted from the code.

For each of the above, think from the perspective of an agent trying to log in
for a user: is the right command discoverable, is it scriptable, what is the
exact recipe, and where would an agent get stuck or have to guess?

Deliverables

  • A comprehensive, code-verified inventory of every login/auth option, with
    pointers to where each lives in the code.
  • A clear picture of test coverage and gaps.
  • Rewritten auth/login docs that are accurate, complete, and optimized for an
    agent (and a user) to quickly know how to log in for any provider, including a
    crisp non-interactive/agent section.
  • Call out any UX gaps that make agent login harder than it should be, with
    suggestions for follow-ups.

Starting points

  • src/cli/args.rs, src/cli/login.rs, src/cli/login/scriptable.rs
  • crates/jcode-app-core/src/external_auth.rs
  • crates/jcode-base/src/auth/ (per-provider modules + tests)
  • OAUTH.md, README.md, TELEMETRY.md

Task for Fable 5.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/cli/args.rs, src/cli/login.rs, src/cli/login/scriptable.rs, and crates/jcode-app-core/src/external_auth.rs, then review crates/jcode-base/src/auth/ and its tests. Compare the code and test coverage with OAUTH.md, README.md, and TELEMETRY.md. Done means a code-verified inventory, accurate agent-focused auth/login documentation, coverage gaps, and identified UX follow-ups.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authentication, cli, documentation, testing-qa
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.