-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update mcs entitlements endpoint #96
Update mcs entitlements endpoint #96
Conversation
Tests failing. Not entirely sure how this test suite could ever succeed? |
Test are failing due to the default clientId: prismarine-auth/src/common/Constants.js Line 27 in fcc959b
No longer being a valid client thus causing the test for fetching deviceCode to fail. Honestly I'm not sure of the benefit of keeping |
Yeah, it can be changed to default to |
Can you rebase on master? |
Rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to know when this changed. Can anyone test to make sure it works?
We run with this endpoint at https://minecraftafk.com (managing thousands of accounts). We have no reported auth issues since making the update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested against both present master and your PR, and they both are working which is a bit odd. They do not return the same data so this could be a breaking change, what do we do about that and do you know why one endpoint would work and not the other?
From a quick check of node-minecraft-protocol we also don't actually verify anything inside The linked issues PrismarineJS/mineflayer#3286 and PrismarineJS/mineflayer#2890 have to do with the /profile endpoint so any changes to the Minecraft java entitlements endpoint here would be unrelated to them. Do you think the PR is still separately valid? |
That's a reasonable assumption but actually incorrect. When refreshing tokens for Xbox Game Pass accounts (and likely other newer accounts) without fetching entitlements, the profile endpoint will return no data. As soon as you make the entitlements request, the profile endpoint is populated. Mojang at their best. |
I guess the old endpoint is preserved for backwards compatibility (why?). As (kind of) mentioned above the current endpoint only seems to cause issues when trying to refresh the token of a newer account (my assumption is post-migration). |
Can you update the types? |
Finished in #101, thanks |
Fixes PrismarineJS/node-minecraft-protocol#1295
Also related (these issues were closed despite not being resolved?):