From aa91a296d0aa87ab263534c3b1ece650f09336aa Mon Sep 17 00:00:00 2001 From: Tristan Bastian Date: Fri, 24 Oct 2025 23:08:03 +0200 Subject: [PATCH] feat: add support for using client id extracted from android app --- PyViCare/PyViCareBrowserOAuthManager.py | 2 +- PyViCare/PyViCareOAuthManager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PyViCare/PyViCareBrowserOAuthManager.py b/PyViCare/PyViCareBrowserOAuthManager.py index c947e2c3..0b0ec102 100644 --- a/PyViCare/PyViCareBrowserOAuthManager.py +++ b/PyViCare/PyViCareBrowserOAuthManager.py @@ -52,7 +52,7 @@ def __execute_browser_authentication(self): oauth_session = OAuth2Session( self.client_id, redirect_uri=redirect_uri, scope=VIESSMANN_SCOPE, code_challenge_method='S256') code_verifier = generate_token(48) - authorization_url, _ = oauth_session.create_authorization_url(AUTHORIZE_URL, code_verifier=code_verifier) + authorization_url, _ = oauth_session.create_authorization_url(AUTHORIZE_URL, code_verifier=code_verifier, scope="Internal openid offline_access") webbrowser.open(authorization_url) diff --git a/PyViCare/PyViCareOAuthManager.py b/PyViCare/PyViCareOAuthManager.py index 0db74831..68e4f070 100644 --- a/PyViCare/PyViCareOAuthManager.py +++ b/PyViCare/PyViCareOAuthManager.py @@ -57,7 +57,7 @@ def __create_new_session(self, username, password, token_file=None): oauth_session = OAuth2Session( self.client_id, redirect_uri=REDIRECT_URI, scope=VIESSMANN_SCOPE, code_challenge_method='S256') code_verifier = generate_token(48) - authorization_url, _ = oauth_session.create_authorization_url(AUTHORIZE_URL, code_verifier=code_verifier) + authorization_url, _ = oauth_session.create_authorization_url(AUTHORIZE_URL, code_verifier=code_verifier, scope="Internal openid offline_access") logger.debug("Auth URL is: %s", authorization_url) header = {'Content-Type': 'application/x-www-form-urlencoded'}