Skip to content

Commit

Permalink
fix(helix): avoid copying default token (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed Sep 3, 2022
1 parent 6a90523 commit 43b5225
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -62,10 +62,11 @@ public TwitchHelixTokenManager(String clientId, String clientSecret, OAuth2Crede
this.defaultAuthToken = defaultAuthToken;

if (defaultAuthToken != null) {
this.defaultClientId = defaultAuthToken.getContext().getOrDefault(CLIENT_ID_CONTEXT, clientId).toString();
twitchIdentityProvider.getAdditionalCredentialInformation(defaultAuthToken).ifPresent(oauth -> {
populateCache(oauth);
this.defaultClientId = extractClientId(oauth);
this.defaultAuthToken = oauth;
this.defaultAuthToken.updateCredential(oauth);
});
}
}
Expand Down

0 comments on commit 43b5225

Please sign in to comment.