diff --git a/cura/OAuth2/AuthorizationHelpers.py b/cura/OAuth2/AuthorizationHelpers.py index a654ee4bdb..569ba80659 100644 --- a/cura/OAuth2/AuthorizationHelpers.py +++ b/cura/OAuth2/AuthorizationHelpers.py @@ -40,6 +40,7 @@ class AuthorizationHelpers: """ data = { "client_id": self._settings.CLIENT_ID if self._settings.CLIENT_ID is not None else "", + "client_secret": self._settings.CLIENT_SECRET if self._settings.CLIENT_SECRET is not None else "", "redirect_uri": self._settings.CALLBACK_URL if self._settings.CALLBACK_URL is not None else "", "grant_type": "authorization_code", "code": authorization_code, @@ -64,6 +65,7 @@ class AuthorizationHelpers: Logger.log("d", "Refreshing the access token for [%s]", self._settings.OAUTH_SERVER_URL) data = { "client_id": self._settings.CLIENT_ID if self._settings.CLIENT_ID is not None else "", + "client_secret": self._settings.CLIENT_SECRET if self._settings.CLIENT_SECRET is not None else "", "redirect_uri": self._settings.CALLBACK_URL if self._settings.CALLBACK_URL is not None else "", "grant_type": "refresh_token", "refresh_token": refresh_token, diff --git a/cura/OAuth2/Models.py b/cura/OAuth2/Models.py index 4c84872a09..3427f1cc3d 100644 --- a/cura/OAuth2/Models.py +++ b/cura/OAuth2/Models.py @@ -16,6 +16,7 @@ class OAuth2Settings(BaseModel): CALLBACK_PORT = None # type: Optional[int] OAUTH_SERVER_URL = None # type: Optional[str] CLIENT_ID = None # type: Optional[str] + CLIENT_SECRET = None # type: Optional[str] CLIENT_SCOPES = None # type: Optional[str] CALLBACK_URL = None # type: Optional[str] AUTH_DATA_PREFERENCE_KEY = "" # type: str