The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
A minimal GitHub-compatible server that the gh CLI signs in to with gh auth login --hostname. It shows how an application serves the oauth package: the device flow, the code flow, personal access tokens, and the parts of GitHub's API that gh calls during sign-in. The OpenID conformance suite runs against it.
The package documentation is in main.go. To read it with the API, run go doc ./examples/ghserver.
To run the real gh CLI against it on port 443 (Linux, needs gh), run just test-gh.
Command ghserver is a minimal GitHub-compatible server that the gh CLI
can sign in to with "gh auth login --hostname". It shows how an
application serves the oauth package: the device flow, the code flow,
personal access tokens, and the parts of GitHub's API that gh calls
during sign-in.
gh only talks HTTPS on port 443, so the server needs a certificate that
gh trusts. To try it on Linux with a self-signed certificate, run:
go run ./examples/ghserver -self-signed cert.pem
SSL_CERT_FILE=cert.pem GH_CONFIG_DIR=$(mktemp -d) gh auth login --hostname localhost --web
Binding port 443 needs root or, on Linux, the CAP_NET_BIND_SERVICE
capability. On macOS, gh ignores SSL_CERT_FILE, so run gh in a Linux
container or trust the certificate in the keychain.
The server signs anyone in by name on its demo sign-in page, without a
password or passkey. It is a demo: a real application signs users in
with the passkey package, as examples/passkeyapp does.