skodaconnect / homeassistant-skodaconnect

Skoda Connect - A home assistant plugin to add integration with your car
Apache License 2.0
226 stars 28 forks source link

Login failure, but it works on the website #238

Closed Cereal2nd closed 10 months ago

Cereal2nd commented 10 months ago

Describe the bug Login failure

**Is this working in MySkoda app?*** Yes

Latest working release It never worked

Debug logs

2023-12-11 15:57:20.091 DEBUG (MainThread) [custom_components.skodaconnect.config_flow] Creating connection to Skoda Connect
2023-12-11 15:57:20.093 INFO (MainThread) [skodaconnect.connection] Unofficial Skoda Connect library, version 1.3.8
2023-12-11 15:57:20.094 DEBUG (MainThread) [skodaconnect.connection] Using service https://msg.volkswagen.de
2023-12-11 15:57:20.097 INFO (MainThread) [skodaconnect.connection] Initiating new login
2023-12-11 15:57:20.099 DEBUG (MainThread) [skodaconnect.connection] Starting authorization process for client technical
2023-12-11 15:57:20.362 DEBUG (MainThread) [skodaconnect.connection] User is not logged on, use signin service
2023-12-11 15:57:20.425 DEBUG (MainThread) [skodaconnect.connection] Found HTML credentials form, extracting attributes
2023-12-11 15:57:20.426 DEBUG (MainThread) [skodaconnect.connection] Start login process for user maikel.punie@gmail.com
2023-12-11 15:57:20.590 DEBUG (MainThread) [skodaconnect.connection] Found dynamic credentials form, extracting attributes
2023-12-11 15:57:20.591 DEBUG (MainThread) [skodaconnect.connection] Script JSON data: {'clientLegalEntityModel': {'clientId': 'f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com', 'clientAppName': 'ŠKODA App & Portal', 'clientAppDisplayName': 'ŠKODA App & Portal', 'legalEntityInfo': {'name': 'ŠKODA', 'shortName': 'SKODA', 'productName': 'ŠKODA ID', 'theme': 'skoda_2023', 'defaultLanguage': 'cs', 'termAndConditionsType': 'DEFAULT', 'legalProperties': {'revokeDataContact': 'infoline@skoda-auto.cz', 'imprintText': 'IMPRINT', 'countryOfJurisdiction': 'CZ'}}, 'informalLanguage': False, 'legalEntityCode': 'skoda', 'imprintTextKey': 'imprint.link.text'}, 'template': 'loginAuthenticate', 'hmac': 'a7da2d4a31dda372f8b8eb88a976000c8ea25a4e9211f90c088d8fedaede8dc3', 'useClientRendering': True, 'titleKey': 'title.login.password', 'title': None, 'emailPasswordForm': {'@class': 'com.volkswagen.identitykit.signin.domain.model.dto.EmailPasswordForm', 'email': 'XXXXXXXXX', 'password': None}, 'error': None, 'relayState': 'XXXXXXXXX', 'nextButtonDisabled': False, 'enableNextButtonAfterSeconds': 0, 'postAction': 'login/authenticate', 'identifierUrl': 'login/identifier'}
2023-12-11 15:57:20.592 DEBUG (MainThread) [skodaconnect.connection] Finalizing login
2023-12-11 15:57:21.158 DEBUG (MainThread) [skodaconnect.connection] Received authorization code, exchange for tokens.
2023-12-11 15:57:21.246 DEBUG (MainThread) [skodaconnect.connection] Got <ClientResponse(https://api.connect.skoda-auto.cz/api/v1/authentication/token?systemId=TECHNICAL) [410 Gone]>
<CIMultiDictProxy('Content-Length': '18', 'Content-Type': 'text/plain', 'Date': 'Mon, 11 Dec 2023 14:57:20 GMT', 'Server': 'istio-envoy', 'Connection': 'close')>

2023-12-11 15:57:21.247 ERROR (MainThread) [skodaconnect.connection] Token exchange failed. Request status: 410
2023-12-11 15:57:21.247 ERROR (MainThread) [custom_components.skodaconnect.config_flow] Login failed with error: Token exchange failed. Request status: 410

Installation:

MaZa78 commented 10 months ago

Duplicate of #237

dvx76 commented 10 months ago

Duplicate indeed. Fixed by https://github.com/skodaconnect/skodaconnect/pull/108