Skip to content

Commit 6dd1cf9

Browse files
committed
Do not store credentials if Zeroconf
1 parent 08e3069 commit 6dd1cf9

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

core/src/main/java/xyz/gianlu/librespot/core/Session.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,9 @@ void authenticate(@NotNull Authentication.LoginCredentials credentials) throws I
346346

347347
dealer.connect();
348348
player.initState();
349-
350349
TimeProvider.init(this);
351350

352351
LOGGER.info(String.format("Authenticated as %s!", apWelcome.getCanonicalUsername()));
353-
354-
355352
mercuryClient.interestedIn("spotify:user:attributes:update", this);
356353
}
357354

@@ -402,7 +399,7 @@ private void authenticatePartial(@NotNull Authentication.LoginCredentials creden
402399
}
403400
}
404401

405-
if (conf().storeCredentials()) {
402+
if (conf().authStrategy() != AuthConfiguration.Strategy.ZEROCONF && conf().storeCredentials()) {
406403
ByteString reusable = apWelcome.getReusableAuthCredentials();
407404
Authentication.AuthenticationType reusableType = apWelcome.getReusableAuthCredentialsType();
408405

0 commit comments

Comments
 (0)