Fixed password=false not using offline mode (#790)

* Fixed password=false not using offline mode

* revert client token change
This commit is contained in:
dada513 2020-12-18 20:49:58 +01:00 committed by GitHub
parent 45c04cb460
commit ea52fb8c13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,7 @@ module.exports = async function (client, options) {
const clientToken = options.clientToken || (options.session && options.session.clientToken) || (options.profilesFolder && (await getLauncherProfiles()).clientToken) || UUID.v4().toString().replace(/-/g, '')
const skipValidation = false || options.skipValidation
options.accessToken = null
options.haveCredentials = options.password != null || (clientToken != null && options.session != null) || (options.profilesFolder && await hasProfileCredentials())
options.haveCredentials = !!options.password || (clientToken != null && options.session != null) || (options.profilesFolder && await hasProfileCredentials())
async function getLauncherProfiles () { // get launcher profiles
try {