Closed Pixelwarp closed 1 year ago
Can you describe it more? (I don't know how to get username or other from only accessToken).
In old protocol, we can have refresh
operation by input client & access token to get the selectedProfile.
Or, are you trying to resolve the Microsoft login issue (#232)?
@ci010 You could use https://api.minecraftservices.com/minecraft/profile, then add a header called "Authorization" with the value of "Bearer ACCESS_TOKEN" then it would return current skin and username and UUID, and etc
GET Request
See new release version https://github.com/Voxelum/minecraft-launcher-core-node/blob/master/packages/user/mojang.ts#L243 should resolve this issue.
Basically could be this ` const { loginWithAccessToken } = require('@xmcl/user');
const user = loginWithAccessToken('access_token'); // returns null if access token is invalid
// User methods user.username; user.accessToken; `