Skip to content

Fix login 403 by persisting captured SLAS cookies - #2

Open
ludmoncada wants to merge 1 commit into
MarkDunne:mainfrom
ludmoncada:fix/login-403-use-captured-tokens
Open

Fix login 403 by persisting captured SLAS cookies#2
ludmoncada wants to merge 1 commit into
MarkDunne:mainfrom
ludmoncada:fix/login-403-use-captured-tokens

Conversation

@ludmoncada

Copy link
Copy Markdown

Fixes #1.

After browser login, AsdaBot discarded SLAS.AUTH_TOKEN and immediately POSTed the refresh token with httpx to www.asda.com/.../oauth2/token. That host is Cloudflare-fronted and returns HTTP 403 to a bare HTTP client.

This change:

  • Persists the access JWT already in SLAS.AUTH_TOKEN (plus ADB2C.AUTH_TOKEN when present)
  • Skips the httpx refresh at login
  • Refreshes later via fetch in the existing Chrome profile

No TLS impersonation or Cloudflare bypass.

Made with Cursor

www.asda.com token refresh is Cloudflare-fronted and returns 403 to
plain HTTP clients, which is issue MarkDunne#1. The access JWT is already in
SLAS.AUTH_TOKEN after browser login; store it and refresh later from
the same Chrome profile.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

auth login consistently fails with "ASDA rejected the session (HTTP 403)"

1 participant