Skip to content

fix(oauth2): log in with the app's HTTPS callback, Porsche rejects the custom scheme - #101

Closed
bartolije wants to merge 1 commit into
CJNE:mainfrom
bartolije:upstream/https-callback
Closed

bartolije wants to merge 1 commit into
CJNE:mainfrom
bartolije:upstream/https-callback

Conversation

@bartolije

@bartolije bartolije commented Nov 14, 2026 •

Copy link
Copy Markdown

Logins fail since around 10 November (reported in CJNE/ha-porscheconnect#465 and CJNE/ha-porscheconnect#466): the Porsche identity server answers /authorize with 403 unauthorized_client: Callback URL mismatch for my-porsche-app://auth0/callback, before the e-mail is sent. Installations keep working until their refresh token is rejected, then the full login fails and Reconfigure reports invalid authentication.

Change

  • REDIRECT_URI is now the HTTPS app link the current My Porsche app uses with the same client_id: https://security.porsche.com/auth/en-GB/app/callback. The custom schemes my-porsche-app:// and my-porsche-app-auth0:// are both refused, and only en-GB is registered for the HTTPS link.
  • When /authorize does not answer 302, the error message now carries the HTTP status (Could not fetch authorization code: HTTP 403) instead of hiding it.

The resume flow already reads the code from the redirect Location without following it, so nothing else changes.

Tests

  • On this branch, /authorize with the old URI gives Could not fetch authorization code: HTTP 403, and with the new one a 302 to the login screen.
  • The full login with this redirect URI (captcha, resume, token exchange, vehicle list and overview) has been running in my fork since 12 November, with users on a 718 Cayman GT4 RS, a Cayenne E-Hybrid and a Taycan 4S.
  • ruff check passes.

EDIT: schaepi85 reached the same fix independently in CJNE/ha-porscheconnect#466. The User-Agent bump is not needed for the login and is left out. Once this is released, ha-porscheconnect needs the new version pinned in its manifest.

…e custom scheme

Since around 10 November the Porsche identity server answers /authorize
with 403 "unauthorized_client: Callback URL mismatch" for
my-porsche-app://auth0/callback, before the e-mail is sent, so every new
login fails. The current My Porsche app logs in with the same client_id and
its HTTPS app link instead. A refused /authorize now reports its HTTP status
instead of a bare failure.
@bartolije

Copy link
Copy Markdown
Author

Duplicate from #100. Not needed anymore.

@bartolije bartolije closed this Nov 14, 2026
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