Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/client/mojangAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ module.exports = async function (client, options) {
options.profilesFolder = mcFolderExists ? mcDefaultFolderPath : '.' // local folder if mc folder doesn't exist
}

const yggdrasilClient = yggdrasil({ agent: options.agent, host: options.authServer || 'https://authserver.mojang.com' })
const mojangAuthServer = 'https://authserver.mojang.com'
const authServer = options.authServer || mojangAuthServer
if (authServer === mojangAuthServer) {
console.warn('[deprecated] mojang auth servers no longer accept mojang accounts to login. convert your account.\nhttps://help.minecraft.net/hc/en-us/articles/4403181904525-How-to-Migrate-Your-Mojang-Account-to-a-Microsoft-Account')
}
const yggdrasilClient = yggdrasil({ agent: options.agent, host: authServer })
const clientToken = options.clientToken || (options.session && options.session.clientToken) || (options.profilesFolder && (await getLauncherProfiles()).mojangClientToken) || UUID.v4().toString().replace(/-/g, '')
const skipValidation = false || options.skipValidation
options.accessToken = null
Expand Down
1 change: 0 additions & 1 deletion src/createClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ function createClient (options) {
} else {
switch (options.auth) {
case 'mojang':
console.warn('[deprecated] mojang auth servers no longer accept mojang accounts to login. convert your account.\nhttps://help.minecraft.net/hc/en-us/articles/4403181904525-How-to-Migrate-Your-Mojang-Account-to-a-Microsoft-Account')
auth(client, options)
onReady()
break
Expand Down
Loading