Skip to content

Commit 41c6a76

Browse files
committed
I can't remember whether auto-auth even works no remove it for now
1 parent 1404e85 commit 41c6a76

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

html/startPage/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ <h1 class='title'>pakkit</h1>
102102
<label for="listen-port">Listen port:</label>
103103
<input id="listen-port" name="listen-port" placeholder="25566" type="text" value="25566"/>
104104
</li>
105-
<li class="form-row" id="consent-row" style="display: none;">
105+
<!-- <li class="form-row" id="consent-row" style="display: none;">
106106
<label for="consent">Consent:<br>
107107
<label class="switch" style="padding: 0;">
108108
<input id="consent" type="checkbox" value="consent"/>
109109
<span class="slider round"></span>
110110
</label>
111111
</label>
112112
<p>Allow pakkit to use my auth token from launcher_profiles.json for logging in to online mode servers.</p>
113-
</li>
113+
</li> -->
114114
<li class="form-row">
115115
<label></label>
116116
<span class="start"><input id="start" type="submit" value="Start!"/></span>

html/startPage/script.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ new customTitlebar.Titlebar({
99
backgroundColor: customTitlebar.Color.fromHex('#FFF')
1010
}); */
1111

12-
if (!store.get('authConsentGiven')) {
13-
document.getElementById('consent-row').style.display = 'flex'
14-
}
12+
// if (!store.get('authConsentGiven')) {
13+
// document.getElementById('consent-row').style.display = 'flex'
14+
// }
1515

1616
let isLoading = false
1717
let connectAddress
@@ -107,9 +107,10 @@ window.startProxy = function (event)
107107
connectPort = (connectPort === '') ? '25565' : connectPort
108108
listenPort = (listenPort === '') ? '25566' : listenPort
109109
}
110-
if (document.getElementById('consent').checked) {
111-
store.set('authConsentGiven', true)
112-
}
110+
// if (document.getElementById('consent').checked) {
111+
// store.set('authConsentGiven', true)
112+
// }
113+
store.set('authConsentGiven', false)
113114
// TODO: Validate data (e.g. port range)
114115
ipcRenderer.send('startProxy', JSON.stringify({
115116
consent: store.get('authConsentGiven'),

src/proxy/java/proxy.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ let authWindowOpen = false
4545
exports.startProxy = function (host, port, listenPort, version, onlineMode, authConsent, callback, messageCallback, dataFolder,
4646
updateFilteringCallback, authCodeCallback) {
4747
storedCallback = callback
48+
authConsent = false
4849

4950
// . cannot be in a JSON property name with electron-store
5051
exports.capabilities.versionId = 'java-node-minecraft-protocol-' + version.split('.').join('-')
@@ -107,11 +108,11 @@ exports.startProxy = function (host, port, listenPort, version, onlineMode, auth
107108
console.log(err.stack)
108109
if (!endedTargetClient) { targetClient.end('Error') }
109110
})
110-
if (authConsent) {
111-
console.log('Will attempt to use launcher_profiles.json for online mode login data')
112-
} else {
113-
console.warn('Consent not given to use launcher_profiles.json - automatic online mode will not work')
114-
}
111+
// if (authConsent) {
112+
// console.log('Will attempt to use launcher_profiles.json for online mode login data')
113+
// } else {
114+
// console.warn('Consent not given to use launcher_profiles.json - automatic online mode will not work')
115+
// }
115116
const clientOptions = {
116117
host: host,
117118
port: port,

0 commit comments

Comments
 (0)