[PR #790] [MERGED] fix(web-auth): add debug diagnostics for 401 login failures #789

Closed
opened 2026-02-26 22:32:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/790
Author: @rudrankriyam
Created: 2/26/2026
Status: Merged
Merged: 2/26/2026
Merged by: @rudrankriyam

Base: mainHead: feat/web-auth-debug-logging


📝 Commits (1)

  • 2fc11a8 fix(web-auth): add redacted debug diagnostics for login failures

📊 Changes

5 files changed (+331 additions, -9 deletions)

View changed files

internal/cli/shared/debug_overrides_test.go (+67 -0)
📝 internal/cli/shared/shared.go (+10 -4)
📝 internal/cli/web/web_auth.go (+2 -0)
📝 internal/web/auth.go (+161 -5)
📝 internal/web/auth_test.go (+91 -0)

📄 Description

Summary

  • apply root --debug / --api-debug runtime overrides to web-session auth flows so debug flags work for asc web auth login
  • add sanitized web-auth HTTP diagnostics for each auth stage (status, request/correlation IDs, and service error codes) without leaking tokens/passwords/query secrets
  • add tests for root logging override application and redaction/no-op behavior in web auth debug logging

Test plan

  • ASC_BYPASS_KEYCHAIN=1 go test ./internal/web ./internal/cli/shared ./internal/cli/web ./internal/cli/cmdtest
  • make format
  • make lint
  • ASC_BYPASS_KEYCHAIN=1 make test

Why this helps with 401s

  • friend can run asc --debug web auth login --apple-id \"...\" (or --api-debug) and share request metadata + stage-level status/codes for diagnosis
  • logs include Apple request IDs and service codes while keeping sensitive values redacted

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/790 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 2/26/2026 **Status:** ✅ Merged **Merged:** 2/26/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feat/web-auth-debug-logging` --- ### 📝 Commits (1) - [`2fc11a8`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/2fc11a892a5827b8f1fe1312eb8408f69b34d154) fix(web-auth): add redacted debug diagnostics for login failures ### 📊 Changes **5 files changed** (+331 additions, -9 deletions) <details> <summary>View changed files</summary> ➕ `internal/cli/shared/debug_overrides_test.go` (+67 -0) 📝 `internal/cli/shared/shared.go` (+10 -4) 📝 `internal/cli/web/web_auth.go` (+2 -0) 📝 `internal/web/auth.go` (+161 -5) 📝 `internal/web/auth_test.go` (+91 -0) </details> ### 📄 Description ## Summary - apply root `--debug` / `--api-debug` runtime overrides to web-session auth flows so debug flags work for `asc web auth login` - add sanitized web-auth HTTP diagnostics for each auth stage (status, request/correlation IDs, and service error codes) without leaking tokens/passwords/query secrets - add tests for root logging override application and redaction/no-op behavior in web auth debug logging ## Test plan - [x] `ASC_BYPASS_KEYCHAIN=1 go test ./internal/web ./internal/cli/shared ./internal/cli/web ./internal/cli/cmdtest` - [x] `make format` - [x] `make lint` - [x] `ASC_BYPASS_KEYCHAIN=1 make test` ## Why this helps with 401s - friend can run `asc --debug web auth login --apple-id \"...\"` (or `--api-debug`) and share request metadata + stage-level status/codes for diagnosis - logs include Apple request IDs and service codes while keeping sensitive values redacted --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:32:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#789
No description provided.