Skip to content

fix(intrade-bar): follow opaque legacy login redirects - #168

Merged
LimiNode merged 2 commits into
mainfrom
fix/intrade-opaque-login
Sep 14, 2026
Merged

LimiNode merged 2 commits into
mainfrom
fix/intrade-opaque-login

Conversation

@LimiNode

@LimiNode LimiNode commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • support the legacy Intrade login response that returns window.location.replace(...) with an opaque /auth/<token> URL;
  • follow the token redirect, merge issued Set-Cookie values, and keep the broker-selected origin for the subsequent /auth request;
  • validate absolute redirect origins against the HTTPS intrade.bar / intrade<N>.bar allowlist and fail closed before forwarding login cookies elsewhere;
  • preserve the existing id/hash login format, including absolute legacy redirects, and add parser plus local HTTP regression coverage.

Verification

  • intrade_bar_api_response_test.exe — 93 tests passed;
  • live auth-cache through the updated proxy — fresh and cached authentication passed;
  • live quotes --symbol=EURUSD — quote snapshot returned successfully;
  • live show-account and CSV history smoke checks passed without trade requests.

The new trading.intrade.bar broker/API is intentionally out of scope and will be implemented as a separate platform.

Support the legacy broker login response that returns a JavaScript redirect with a one-time auth token. Follow the redirect, merge issued cookies, preserve the existing id/hash parser, and keep the selected redirect origin for subsequent authentication requests. Add parser and local HTTP regression coverage.
@LimiNode
LimiNode force-pushed the fix/intrade-opaque-login branch from 9d6e46d to 2e244cf Compare September 14, 2026 16:58
@LimiNode
LimiNode merged commit 9ce6a49 into main Sep 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant