mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
uses microsoft auth by default
This commit is contained in:
parent
4691abd036
commit
5a653f68fe
3 changed files with 3 additions and 3 deletions
|
@ -81,7 +81,7 @@ Returns a `Client` instance and perform login.
|
|||
`options` is an object containing the properties :
|
||||
* username
|
||||
* port : default to 25565
|
||||
* auth : the type of account to use, either `microsoft` or `mojang`. default to 'mojang'
|
||||
* auth : the type of account to use, either `microsoft` or `mojang`. default to 'microsoft'
|
||||
* password : can be omitted
|
||||
* (microsoft account) leave this blank to use device code auth. If you provide
|
||||
a password, we try to do username and password auth, but this does not always work.
|
||||
|
|
|
@ -78,7 +78,7 @@ var client = mc.createClient({
|
|||
port: 25565, // optional
|
||||
username: "email@example.com",
|
||||
password: "12345678",
|
||||
auth: 'mojang' // optional; by default uses mojang, if using a microsoft account, set to 'microsoft'
|
||||
auth: 'microsoft' // optional; by default uses microsoft
|
||||
});
|
||||
client.on('chat', function(packet) {
|
||||
// Listen for chat messages and echo them back.
|
||||
|
|
|
@ -82,7 +82,7 @@ module.exports = async function (client, options) {
|
|||
remoteId: oldProfileObj?.remoteId ?? '',
|
||||
username: options.username,
|
||||
localId: profile,
|
||||
type: (options.auth?.toLowerCase() === 'microsoft' ? 'Xbox' : 'Mojang'),
|
||||
type: (options.auth?.toLowerCase() === 'mojang' ? 'Mojang' : 'Xbox'),
|
||||
persistent: true
|
||||
}
|
||||
auths.accounts[profile] = newProfileObj
|
||||
|
|
Loading…
Reference in a new issue