Skip to content

Commit 1f122b5

Browse files
fix: Fix incorrect origin for authenticating Minecraft account.
1 parent 03bbd10 commit 1f122b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/modgarden/backend/handler/v1/discord/DiscordBotOAuthHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public static void authMinecraftAccount(Context ctx) {
159159
String microsoftToken = null;
160160
var microsoftTokenRequest = HttpRequest.newBuilder(URI.create("https://login.microsoftonline.com/consumers/oauth2/v2.0/token"))
161161
.header("Content-Type", "application/x-www-form-urlencoded")
162-
.headers("Origin", ModGardenBackend.URL + "/v1/discord/oauth/modrinth")
162+
.headers("Origin", ModGardenBackend.URL + "/v1/discord/oauth/minecraft")
163163
.POST(HttpRequest.BodyPublishers.ofString(AuthUtil.createBody(getMicrosoftAuthorizationBody(code, verifier))));
164164
var microsoftTokenResponse = ModGardenBackend.HTTP_CLIENT.send(microsoftTokenRequest.build(), HttpResponse.BodyHandlers.ofInputStream());
165165

0 commit comments

Comments
 (0)