Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
miosenpai committed Apr 24, 2024
1 parent 25c317a commit 1e0703d
Show file tree
Hide file tree
Showing 3 changed files with 282 additions and 1 deletion.
254 changes: 254 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" nuxt prepare",
"postinstall": "patch-package && cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" nuxt prepare",
"lint": "eslint .",
"start": "node .output/server/index.mjs"
},
Expand Down Expand Up @@ -35,6 +35,7 @@
"p-queue": "^8.0.1",
"p-retry": "^6.2.0",
"p-timeout": "^6.1.2",
"patch-package": "^8.0.0",
"prismarine-viewer": "^1.28.0",
"typescript": "^5.3.3",
"vue": "^3.4.25",
Expand Down
26 changes: 26 additions & 0 deletions patches/prismarine-auth+2.4.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/node_modules/prismarine-auth/src/TokenManagers/MinecraftJavaTokenManager.js b/node_modules/prismarine-auth/src/TokenManagers/MinecraftJavaTokenManager.js
index 2c1294e..18105bd 100644
--- a/node_modules/prismarine-auth/src/TokenManagers/MinecraftJavaTokenManager.js
+++ b/node_modules/prismarine-auth/src/TokenManagers/MinecraftJavaTokenManager.js
@@ -94,7 +94,7 @@ class MinecraftJavaTokenManager {
async fetchEntitlements (accessToken) {
debug(`[mc] fetching entitlements with ${accessToken.slice(0, 16)}`)
const headers = { ...fetchOptions.headers, Authorization: `Bearer ${accessToken}` }
- const entitlements = await fetch(Endpoints.MinecraftServicesEntitlement, { headers }).then(checkStatus)
+ const entitlements = await fetch(Endpoints.MinecraftServicesEntitlement + `?requestId=${crypto.randomUUID()}`, { headers }).then(checkStatus)
debug(`[mc] got entitlement response: ${entitlements}`)
return entitlements
}
diff --git a/node_modules/prismarine-auth/src/common/Constants.js b/node_modules/prismarine-auth/src/common/Constants.js
index fa365b7..9a4e7e9 100644
--- a/node_modules/prismarine-auth/src/common/Constants.js
+++ b/node_modules/prismarine-auth/src/common/Constants.js
@@ -12,7 +12,7 @@ module.exports = {
XstsAuthorize: 'https://xsts.auth.xboxlive.com/xsts/authorize',
MinecraftServicesLogWithXbox: 'https://api.minecraftservices.com/authentication/login_with_xbox',
MinecraftServicesCertificate: 'https://api.minecraftservices.com/player/certificates',
- MinecraftServicesEntitlement: 'https://api.minecraftservices.com/entitlements/mcstore',
+ MinecraftServicesEntitlement: 'https://api.minecraftservices.com/entitlements/license',
MinecraftServicesProfile: 'https://api.minecraftservices.com/minecraft/profile',
MinecraftServicesReport: 'https://api.minecraftservices.com/player/report',
LiveDeviceCodeRequest: 'https://login.live.com/oauth20_connect.srf',

0 comments on commit 1e0703d

Please sign in to comment.