question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple authorization & one failed

See original GitHub issue

Describe the bug I have two cars connected to my skoda account, but I only got Information for one of them. In the log’s I can see that one auth is successfully and one failed.

Latest working release I don’t know, with the current, I don’t get it working.

Debug logs 2022-01-04 10:08:44 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration skodaconnect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-01-04 10:08:50 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {..., 'skodaconnect', ...} 2022-01-04 10:09:17 INFO (MainThread) [homeassistant.setup] Setting up skodaconnect 2022-01-04 10:09:17 INFO (MainThread) [homeassistant.setup] Setup of domain skodaconnect took 0.0 seconds 2022-01-04 10:09:17 DEBUG (MainThread) [custom_components.skodaconnect] Init async_setup_entry 2022-01-04 10:09:17 INFO (MainThread) [skodaconnect.connection] Init Skoda Connect library, version 1.1.12 2022-01-04 10:09:17 DEBUG (MainThread) [skodaconnect.connection] Using service https://msg.volkswagen.de 2022-01-04 10:09:17 INFO (MainThread) [skodaconnect.connection] Initiating new login 2022-01-04 10:09:17 DEBUG (MainThread) [skodaconnect.connection] Starting authorization process for client skoda 2022-01-04 10:09:17 DEBUG (MainThread) [custom_components.skodaconnect] Init async_setup_entry 2022-01-04 10:09:17 INFO (MainThread) [skodaconnect.connection] Init Skoda Connect library, version 1.1.12 2022-01-04 10:09:17 DEBUG (MainThread) [skodaconnect.connection] Using service https://msg.volkswagen.de 2022-01-04 10:09:17 INFO (MainThread) [skodaconnect.connection] Initiating new login 2022-01-04 10:09:17 DEBUG (MainThread) [skodaconnect.connection] Starting authorization process for client skoda 2022-01-04 10:09:22 DEBUG (MainThread) [skodaconnect.connection] Get authorization page: "https://identity.vwgroup.io/oidc/v1/authorize" 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Get authorization page: "https://identity.vwgroup.io/oidc/v1/authorize" 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint: "https://identity.vwgroup.io/signin-service/v1/signin/##ID_01##@apps_vw-dilab_com?relayState=##ID_02##" 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Got authorization endpoint: "https://identity.vwgroup.io/signin-service/v1/signin/##ID_01##@apps_vw-dilab_com?relayState=##ID_03##" 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Got redirect to signin-service 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('_csrf', '##ID_04##') 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('relayState', '##ID_02##') 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('hmac', '##ID_05##') 2022-01-04 10:09:23 DEBUG (MainThread) [skodaconnect.connection] Start authorization for user ##User@Domain## 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Got redirect to signin-service 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('_csrf', '##ID_06##') 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('relayState', '##ID_03##') 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('hmac', '##ID_07##') 2022-01-04 10:09:25 DEBUG (MainThread) [skodaconnect.connection] Start authorization for user ##User@Domain## 2022-01-04 10:09:33 ERROR (MainThread) [skodaconnect.connection] An API error was encountered during login, try again later 2022-01-04 10:09:33 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ##TMB***## for skodaconnect Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/skodaconnect/__init__.py", line 142, in async_setup_entry if not await coordinator.async_login(): File "/config/custom_components/skodaconnect/__init__.py", line 790, in async_login if await self.connection.doLogin() is False: File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 136, in doLogin return await self._authorize('skoda') File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 207, in _authorize location = await self._signin_service(req, authissuer, authorizationEndpoint) File "/usr/local/lib/python3.9/site-packages/skodaconnect/connection.py", line 352, in _signin_service raise SkodaException('Authorization request failed') skodaconnect.exceptions.SkodaException: Authorization request failed 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('_csrf', '##ID_06##') 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('relayState', '##ID_03##') 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('email', '##User@Domain##') 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Extracted form attribute: ('hmac', '##ID_08##') 2022-01-04 10:09:34 DEBUG (MainThread) [skodaconnect.connection] Finalizing login

Installation:

  • Home Assistant variant: Home Assistant OS 7.1 with core-2021.12.7
  • Python version 3.9.7

Additional context I think the skoda api could not handle multiple auth requests. Is it possible to handle both cars with one auth-session?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:39

github_iconTop GitHub Comments

2reactions
Farfarcommented, Jan 12, 2022

I have started working on a different approach for handling the config items where there will be only one config entry per account instead of one per vehicle. This should resolve this issue. It might take some time though since I don’t have that much spare time to work on this at the moment.

1reaction
bslefevrecommented, Apr 7, 2022

This is what I’ve done this time:

  • Deleted the code from disk
  • Removed integration
  • Restarted HASS
  • Copy skodaconnect folder to custom_components
  • Adding skodaconnect integration (with developer tools open for no-caching image image image == Skipping some time == Ok, so it seems that the Citigo-e is offline at the moment (just as my Enyaq was for a week) This means that the list is correct for now and I will check again when I’m seeing 2 cars at skoda-connect.com

Stay tuned!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using multiple authentication schemes on policy causes ...
On the OnAuthenticationFailed > under one of the jwtOptions.Events, add a condition if it's authenticated then complete the task and don't ...
Read more >
IDX10501 error with multiple authentication schemes #18940
I have an application using twoauthentication schemes (called Auth0 and a Custom-Auth scheme). Auth0 uses asymmetric signing (RS256) and Custom- ...
Read more >
Multiple Authentication Providers in Spring Security - Baeldung
1. Overview. In this quick article, we're going to focus on using multiple mechanisms to authenticate users in Spring Security.
Read more >
ASP.NET Core: Supporting multiple Authorization, route ...
This error is thrown when the authentication fails and the challenge is not met, make sure you're using the correct API in the...
Read more >
Authorize with a specific scheme in ASP.NET Core
This article explains how to limit identity to a specific scheme when working with multiple authentication methods.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found