mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-24 08:17:52 -05:00
Remove entitlement check in microsoftAuth (#929)
redundant with the existing profile check
This commit is contained in:
parent
d4bc14a583
commit
010d6b229c
1 changed files with 1 additions and 2 deletions
|
@ -14,7 +14,7 @@ async function authenticate (client, options) {
|
|||
}
|
||||
|
||||
const Authflow = new PrismarineAuth(options.username, options.profilesFolder, options, options.onMsaCode)
|
||||
const { token, entitlements, profile } = await Authflow.getMinecraftJavaToken({ fetchEntitlements: true, fetchProfile: true }).catch(e => {
|
||||
const { token, entitlements, profile } = await Authflow.getMinecraftJavaToken({ fetchProfile: true }).catch(e => {
|
||||
if (options.password) console.warn('Sign in failed, try removing the password field\n')
|
||||
if (e.toString().includes('Not Found')) console.warn(`Please verify that the account ${options.username} owns Minecraft\n`)
|
||||
throw e
|
||||
|
@ -23,7 +23,6 @@ async function authenticate (client, options) {
|
|||
debug('[mc] entitlements', entitlements)
|
||||
debug('[mc] profile', profile)
|
||||
|
||||
if (!entitlements.items?.length) throw Error(`Signed in account ${options.username} doesn't appear to own Minecraft`)
|
||||
if (!profile || profile.error) throw Error(`Failed to obtain profile data for ${options.username}, does the account own minecraft?`)
|
||||
|
||||
options.haveCredentials = token !== null
|
||||
|
|
Loading…
Reference in a new issue