Cura/cura
Kostas Karmas 07594f17a7 Fix setting empty auth tokens in the keyring on startup
When Cura is starting up, it reads the authentication data from the preferences (cura.cfg). If
the auth tokens have previously been stored in the keyring, it means that their values will be null
in the cura.cfg file. Therefore, on startup, Cura reads the tokens as none from the preferences and
then sets the empty values in the keyring as tokens. This leads to the user being signed off every
time Cura restarts on Mac.

On Windows, the access token was still stored in the preferences, so on startup it was safe. The
refresh token, on the other hand, had the same issue as on Mac, which means that on startup it was
read as None from the cura.cfg and was stored in the keyring as an empty string. This meant that,
even though on startup (on windows) the user was kept signed in, the next time Cura was attempting
to refresh the access token (after 7-8 minutes), it wouldn't be able, since its refresh token was
read as "" from the keyring. Also, if the user would close Cura and reopen it after 10 minutes
(so after the access token had expired) then they would be signed off on windows too.

This commit fixes that by making sure that if the given value of the refresh and access tokens are
empty, then they will not be stored in the keyring.

CURA-8178
2021-04-16 17:05:08 +02:00
..
API Delete the auth data on upgrade from 4.8 if the scope doesn't match 2021-04-08 12:46:52 +02:00
Arranging Fix segfault when arranging without any disallowed areas 2021-04-14 00:32:50 +02:00
Backups Obfuscate sensitive preference data from the back-up 2021-03-17 08:54:16 +01:00
Machines Allow setting visibilities to be upgraded 2021-04-01 16:15:47 +02:00
OAuth2 Fix setting empty auth tokens in the keyring on startup 2021-04-16 17:05:08 +02:00
Operations Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
PrinterOutput Prevent division by 0 if total download size is 0 2020-07-06 17:23:58 +02:00
ReaderWriters Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Scene Cache wasn't valid due to a reference being stored, not a copy. 2020-10-09 13:39:53 +02:00
Settings Clean up invalid quality changes robust to asynchronous changes 2021-03-16 16:36:01 +01:00
Stages Move CuraStage back to where plugins expect it. 2019-03-29 13:11:03 +01:00
TaskManagement Move HttpRequestManager to Uranium 2020-01-03 08:59:29 +01:00
UI Transfer the "What's new" and "Changelog" pages at the end of wizard 2021-03-25 13:29:17 +01:00
UltimakerCloud Not logged in for API calls is not a warning 2020-10-16 14:15:18 +02:00
Utils Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
__init__.py T466: Revert the previous commit since it messed up the file rights. 2016-12-23 15:53:15 -05:00
ApplicationMetadata.py Increment SDK version to 7.5.0 2021-04-06 13:28:08 +02:00
AutoSave.py Remove unneeded call to autosave trigger on initializaiton 2020-06-18 17:59:35 +02:00
BuildVolume.py Ensure that the skirt_brim_line_width is selected from right extruder 2020-12-18 11:31:55 +01:00
CameraAnimation.py Merge pull request #905 from Ultimaker/snappier_camera_animation 2017-10-24 10:36:55 +02:00
CrashHandler.py Apply bitmask to user scope 2020-09-08 02:00:58 +02:00
CuraActions.py Update bugreport link 2020-09-07 10:47:52 +02:00
CuraApplication.py Bumped up the Preference version to 7 2021-04-02 14:41:52 +02:00
CuraPackageManager.py Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments 2020-05-28 17:31:24 +02:00
CuraVersion.py.in Add the CURA_DIGITAL_FACTORY_URL variable 2020-09-14 21:15:32 +02:00
CuraView.py Fix bunch of issues found by pylint 2020-01-10 16:37:46 +01:00
Layer.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
LayerData.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
LayerDataBuilder.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
LayerDataDecorator.py Converted comments in dir Cura/cura to rst style 2020-04-21 16:58:45 +02:00
LayerPolygon.py Fix mypy issues caused by numpy upgrade 2021-04-07 11:47:52 +02:00
MachineAction.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
MultiplyObjectsJob.py Modify arrange() to optionally create AddSceneNodeOperations 2020-10-09 17:12:59 +02:00
OneAtATimeIterator.py Exclude objects outside buildplate from OneAtATimeIterator 2020-10-14 17:14:38 +02:00
PickingPass.py Pass the cached normal transformation to the rendere 2020-06-30 13:39:32 +02:00
PlatformPhysics.py Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
PreviewPass.py Revert "Revert "Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7"" 2020-08-20 16:35:52 +02:00
PrinterOutputDevice.py Fix typo in a log warning message 2019-05-16 12:04:26 +02:00
PrintJobPreviewImageProvider.py Converted comments in dir Cura/cura to rst style 2020-04-21 16:58:45 +02:00
SingleInstance.py Consider user preference when opening project files from cli. 2019-10-01 11:54:53 +02:00
Snapshot.py Fix mypy issues caused by numpy upgrade 2021-04-07 11:47:52 +02:00
XRayPass.py Pass the cached normal transformation to the rendere 2020-06-30 13:39:32 +02:00