mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Merge pull request #635 from nextcloud/upstream/issue/6522
OAuth2: Try to refresh the token even if the credentials weren't ready.
This commit is contained in:
commit
4e866123c5
1 changed files with 4 additions and 4 deletions
|
@ -335,10 +335,10 @@ void AccountState::slotInvalidCredentials()
|
|||
|
||||
if (account()->credentials()->ready()) {
|
||||
account()->credentials()->invalidateToken();
|
||||
if (auto creds = qobject_cast<HttpCredentials *>(account()->credentials())) {
|
||||
if (creds->refreshAccessToken())
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (auto creds = qobject_cast<HttpCredentials *>(account()->credentials())) {
|
||||
if (creds->refreshAccessToken())
|
||||
return;
|
||||
}
|
||||
account()->credentials()->askFromUser();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue