mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-27 17:55:45 -05:00
Follow the authentication spec more closely : use username sent by mojang. (#684)
* Follow the authentication spec more closely. Theoretically this shouldn't make much of a difference, but I did notice it when I was reading through the npm code. We should trust the API, not our own understanding of the API, just for safety reasons. * Keep comment together with relevant code.
This commit is contained in:
parent
b6d47ddc8e
commit
5ccb48e255
1 changed files with 1 additions and 0 deletions
|
@ -83,6 +83,7 @@ module.exports = function (client, server, options) {
|
|||
// Convert to a valid UUID until the session server updates and does
|
||||
// it automatically
|
||||
client.uuid = profile.id.replace(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/, '$1-$2-$3-$4-$5')
|
||||
client.username = profile.name
|
||||
client.profile = profile
|
||||
loginClient()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue