Skip to content

Commit

Permalink
5.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanro50 committed Jan 31, 2024
1 parent f40ad5f commit b58c1fa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "msmc",
"version": "5.0.1",
"version": "5.0.3",
"description": "A bare bones login library for Minecraft based projects to authenticate individuals with a Microsoft account.",
"license": "MIT",
"exports": {
Expand Down
10 changes: 6 additions & 4 deletions src/auth/xbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class Xbox {
"Content-Type": "application/json",
Accept: "application/json",
},
},
}
);
errorResponse(rlogin_with_xbox, "error.auth.minecraft.login");
var MCauth = (await rlogin_with_xbox.json()) as MCAuthToken;
Expand All @@ -111,9 +111,9 @@ export class Xbox {
Accept: "application/json",
Authorization: `Bearer ${MCauth.access_token}`,
},
},
}
);
errorResponse(r998, "error.auth.minecraft.profile");

var MCprofile = (await r998.json()) as MCProfile & { error?: string };
const profile = MCprofile.error
? {
Expand All @@ -136,8 +136,10 @@ export class Xbox {
mc = new Minecraft(
MCauth.access_token,
{ id: MCauth.username, capes: [], skins: [], name: social.gamerTag },
this,
this
);
} else {
errorResponse(r998, "error.auth.minecraft.profile");
}
}
return mc;
Expand Down

0 comments on commit b58c1fa

Please sign in to comment.