mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 11:19:18 +01:00
Fix refresh token issues with Google Drive.
This commit is contained in:
parent
b5b371ef6f
commit
160d9edfb6
@ -49,8 +49,9 @@ void GoogleDriveSettingsPage::Load() {
|
||||
s.beginGroup(GoogleDriveService::kSettingsGroup);
|
||||
|
||||
const QString user_email = s.value("user_email").toString();
|
||||
const QString refresh_token = s.value("refresh_token").toString();
|
||||
|
||||
if (!user_email.isEmpty()) {
|
||||
if (!user_email.isEmpty() && !refresh_token.isEmpty()) {
|
||||
ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn, user_email);
|
||||
}
|
||||
}
|
||||
|
@ -161,7 +161,9 @@ void OAuthenticator::RefreshAccessTokenFinished(QNetworkReply* reply) {
|
||||
|
||||
QVariantMap result = parser.parse(reply, &ok).toMap();
|
||||
access_token_ = result["access_token"].toString();
|
||||
refresh_token_ = result["refresh_token"].toString();
|
||||
if (result.contains("refresh_token")) {
|
||||
refresh_token_ = result["refresh_token"].toString();
|
||||
}
|
||||
SetExpiryTime(result["expires_in"].toInt());
|
||||
emit Finished();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user