Allow upgrade path when the server removes support for oauth
Relates: https://github.com/owncloud/client/issues/5848#issuecomment-
317353049
We also need to force the account to commit the config to the disk,
otherwise we may not register we are no longer using owncloud and we
risk sending the password as the token to the token refresh API call
bool ok = dialog.exec();
if (ok) {
_password = dialog.textValue();
+ _refreshToken.clear();
_ready = true;
persist();
}
_account->setCredentialSetting(QLatin1String(userC), _user);
_account->setCredentialSetting(QLatin1String(isOAuthC), isUsingOAuth());
+ _account->wantsAccountSaved(_account);
// write cert
WritePasswordJob *job = new WritePasswordJob(Theme::instance()->appName());