Skip to content

fix(skoda): correct VW authorize params — native login now works live - #223

Merged
CallMeTechie merged 1 commit into
masterfrom
fix/skoda-login-authorize-params
Jul 22, 2026
Merged

fix(skoda): correct VW authorize params — native login now works live#223
CallMeTechie merged 1 commit into
masterfrom
fix/skoda-login-authorize-params

Conversation

@CallMeTechie

Copy link
Copy Markdown
Owner

Problem

Live login failed with status login_failed (detail: SKODA_AUTH_FLOW_CHANGED: cannot parse identity page). Root cause traced systematically: the very first request to /oidc/v1/authorize returned HTTP 401 {"error":"invalid_token"} — the native flow was built from synthetic fixtures and never verified against the real API, so the authorize request was malformed.

Fix (verified against the live Skoda API + the python-myskoda reference)

  • response_type: code id_tokencode
  • code_challenge_method: S256s256 (lowercase)
  • added prompt=login
  • with response_type=code the auth code returns as a query param (?code=), not the #fragmentparseFragment now reads query first, fragment as fallback

Verification

Ran the full corrected flow end-to-end against the real API using the operator's stored credential (nothing sensitive logged): authorize 200 → email page parsed → password page parsed → reached myskoda:// redirect → code extracted via query → token exchange 200, access token obtained. Unit tests updated (authorize params asserted, query-based code extraction covered); all 61 skoda tests pass.

Trivy's HIGH (grpc-go GHSA-hrxh-6v49-42gf) is a pre-existing Caddy/Go base-image CVE, unrelated to this change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NACNfM9Uv6hwZwzXpEkHXQ

The native login was built from synthetic fixtures and failed live with HTTP
401 invalid_token on /oidc/v1/authorize. Verified against the real Skoda API
and the python-myskoda reference:
- response_type must be 'code' (not 'code id_token')
- code_challenge_method must be lowercase 's256'
- prompt=login is required
- with response_type=code the auth code returns as a QUERY param, not the
  #fragment, so parseFragment now reads query first, fragment as fallback

Confirmed end-to-end against the live API: full flow now yields an access
token.
@CallMeTechie
CallMeTechie merged commit 8e1133e into master Jul 22, 2026
7 of 8 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