mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
OAuth: clear refresh token when the server claim not to support oauth
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
This commit is contained in:
parent
c043840cb1
commit
6ae88514d8
2 changed files with 2 additions and 0 deletions
|
@ -120,6 +120,7 @@ void HttpCredentialsGui::showDialog()
|
|||
bool ok = dialog.exec();
|
||||
if (ok) {
|
||||
_password = dialog.textValue();
|
||||
_refreshToken.clear();
|
||||
_ready = true;
|
||||
persist();
|
||||
}
|
||||
|
|
|
@ -397,6 +397,7 @@ void HttpCredentials::persist()
|
|||
|
||||
_account->setCredentialSetting(QLatin1String(userC), _user);
|
||||
_account->setCredentialSetting(QLatin1String(isOAuthC), isUsingOAuth());
|
||||
_account->wantsAccountSaved(_account);
|
||||
|
||||
// write cert
|
||||
WritePasswordJob *job = new WritePasswordJob(Theme::instance()->appName());
|
||||
|
|
Loading…
Reference in a new issue