Skip to content

Commit 7d4c321

Browse files
committed
If a provider authentication results to login failure, remove the saved authentication parameters
1 parent e8f39de commit 7d4c321

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/qfieldcloudconnection.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,14 @@ void QFieldCloudConnection::login()
300300
emit loginFailed( message );
301301
}
302302

303+
if ( !mProvider.isEmpty() && !mProviderConfigId.isEmpty() )
304+
{
305+
QgsApplication::instance()->authManager()->removeAuthenticationConfig( mProviderConfigId );
306+
mProviderConfigId.clear();
307+
QSettings().remove( "/QFieldCloud/providerConfigId" );
308+
emit providerConfigurationChanged();
309+
}
310+
303311
setStatus( ConnectionStatus::Disconnected );
304312
return;
305313
}

0 commit comments

Comments
 (0)