Skip to content

Commit

Permalink
Update TokenRefresher.java to fix refreshToken calls to Apple (#1374)
Browse files Browse the repository at this point in the history
  • Loading branch information
hgandhi90 authored Jul 9, 2024
1 parent 50b380b commit 00f90c9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ public static HttpRequest.Builder buildRefreshRequestUrlForAccessToken(
TokensAndUrlAuthData authData, AppCredentials appCredentials) throws IllegalStateException {
BodyPublisher postBody = buildRefreshRequestPostBody(authData, appCredentials);
URI refreshUri = authData.getTokenServerEncodedUri();
return HttpRequest.newBuilder().uri(refreshUri).POST(postBody);
return HttpRequest.newBuilder()
.uri(refreshUri)
.POST(postBody)
.header("content-type", "application/x-www-form-urlencoded");
}

private static BodyPublisher buildRefreshRequestPostBody(
Expand Down

0 comments on commit 00f90c9

Please sign in to comment.