diff --git a/app/assets/js/authmanager.js b/app/assets/js/authmanager.js index 2dd5791..f9acc6c 100644 --- a/app/assets/js/authmanager.js +++ b/app/assets/js/authmanager.js @@ -29,14 +29,20 @@ const log = LoggerUtil.getLogger('AuthManager') * @param {string} password The account password. * @returns {Promise.} Promise which resolves the resolved authenticated account object. */ -exports.addMojangAccount = async function(username, password) { +exports.addMojangAccount = async function(username, password){ try { const response = await MojangRestAPI.authenticate(username, password, ConfigManager.getClientToken()) console.log(response) if(response.responseStatus === RestResponseStatus.SUCCESS) { - const session = response.data + console.log(session) + session.selectedProfile = { + id:'12039109283', + acessToken:'asdasdas', + clientToken: 'asdasldkjalskdj', + } if(session.selectedProfile != null){ + console.log("here") const ret = ConfigManager.addMojangAuthAccount(session.selectedProfile.id, session.accessToken, username, session.selectedProfile.name) if(ConfigManager.getClientToken() == null){ ConfigManager.setClientToken(session.clientToken) @@ -77,7 +83,8 @@ const AUTH_MODE = { FULL: 0, MS_REFRESH: 1, MC_REFRESH: 2 } */ async function fullMicrosoftAuthFlow(entryCode, authMode) { try { - + console.error("try auth from ms") + return Promise.reject(microsoftErrorDisplayable(MicrosoftErrorCode.UNKNOWN)) let accessTokenRaw let accessToken if(authMode !== AUTH_MODE.MC_REFRESH) { diff --git a/app/assets/js/distromanager.js b/app/assets/js/distromanager.js index 8ae8ca0..8d690d2 100644 --- a/app/assets/js/distromanager.js +++ b/app/assets/js/distromanager.js @@ -4,7 +4,11 @@ const ConfigManager = require('./configmanager') // Old WesterosCraft url. // exports.REMOTE_DISTRO_URL = 'http://mc.westeroscraft.com/WesterosCraftLauncher/distribution.json' +// exports.REMOTE_DISTRO_URL = 'https://skirda-minecraft-distribution.brzezinski.ru/distribution.json' exports.REMOTE_DISTRO_URL = 'https://helios-files.geekcorner.eu.org/distribution.json' +// exports.REMOTE_DISTRO_URL = 'http://192.168.88.10:8080/distribution/manifest' +// exports.REMOTE_DISTRO_URL = 'http://gregbrzezinski:8080/distribution/manifest' +// exports.REMOTE_DISTRO_URL = 'http://localhost:8080/distribution/files/files/distribution.json' const api = new DistributionAPI( ConfigManager.getLauncherDirectory(),