auth: log the real error on OIDC callback failures
Summary
OIDC login failed in prod with a bare "token exchange failed" and no way
to see why — every error branch in CallbackHandler (state lookup, token
exchange, missing id_token, ID-token verification) discarded the actual
error and returned only a generic message to the browser.
-
internal/auth/oidc.go:log.Printfthe real error at each of those points, matching the existinglog.Printf-style logging used elsewhere (cmd/rax/main.go,internal/web/devices.go).
Doesn't change any behavior — same responses to the browser, just visible
diagnostics in Rax's own logs now. Needed to actually diagnose the
rax.hop179.net token-exchange failure the operator hit.
Test plan
-
gofmt -s -w . && gofmt -l . && go build ./... && go vet ./... && go test ./...— clean