If you feel uncomfortable signing into GitHub in the node-webkit frame, these instructions will go over a manual way to authorize and set your token.
Note: This guide assumes Gitter is already an authorized app for your GitHub account. To do this, just make sure you can sign in with the web client in your browser.
Use the login link in the top right of the developer.gitter.im.
Once logged in, you should be redirected to a page with your token and "Your Apps". You can also access this page in the top right via the "Apps" navigation item.
We are just concerned with the token.
For example, the fake example token we will use is: 123f45678ak11a2e3ff04a55fk670e7fake9
Note: Do not share your token. It is tied to your account and anyone with this token can perform actions on behalf of your account.
Open a new Gitter desktop instance through the terminal CLI/CMD prompt with the --remote-debugging-port
flag option. You can find the path to the Gitter.exe via your shortcut. On Windows, my path looked like this:
C:\Users\madli_000\AppData\Local\Programs\Gitter\Gitter.exe --remote-debugging-port=1234
open /Applications/Gitter.app --args --remote-debugging-port=1234
Visit http://localhost:1234/
in your browser and you should see "Inspectable WebContents" with some entries.
Choose the "Gitter" one, not the login window.
Go to the console and enter the following snippet; remember to replace the settings.token
line appropriately with your Gitter personal token we got in a previous step.
var Store = require('jfs');
var db = new Store(gui.App.dataPath + '/gitter_preferences.json', { pretty: true });
// initial load is done synchronously
var settings = db.getSync('settings');
settings.token = '123f45678ak11a2e3ff04a55fk670e7fake9';
db.save('settings', settings, function (err) {
if (err) {
console.error('ERROR: Could not save settings.');
return events.emit('settings:failed', err);
}
console.log('Settings saved succcessfully');
events.emit('settings:saved');
});
Exit the app. Then start it back up and you should be signed in and be able to chat :)
On OS X, the executable appears to be
/Applications/Gitter.app/Contents/MacOS/Gitter
, yet runningyields
ERR_CONNECTION_REFUSED
in Chrome when accessing localhost:1234.