Update prismarine-auth usage (#153)
This commit is contained in:
parent
214c34c44b
commit
1b422ac4ce
5 changed files with 11 additions and 10 deletions
|
|
@ -16,12 +16,16 @@ async function authenticate (client, options) {
|
|||
if (!options.profilesFolder) {
|
||||
options.profilesFolder = path.join(minecraftFolderPath, 'nmp-cache')
|
||||
}
|
||||
if (!options.authTitle) {
|
||||
if (options.authTitle === undefined) {
|
||||
options.authTitle = Titles.MinecraftNintendoSwitch
|
||||
options.deviceType = 'Nintendo'
|
||||
}
|
||||
try {
|
||||
const Authflow = new PrismarineAuth(options.username, options.profilesFolder, options, options.onMsaCode)
|
||||
const chains = await Authflow.getMinecraftBedrockToken(client.clientX509)
|
||||
const chains = await Authflow.getMinecraftBedrockToken(client.clientX509).catch(e => {
|
||||
if (options.password) console.warn('Sign in failed, try removing the password field')
|
||||
throw e
|
||||
})
|
||||
|
||||
debug('chains', chains)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue