From 9c9fd26383ddbd4e953acd70483640cd819a03a9 Mon Sep 17 00:00:00 2001 From: Ed Summers Date: Fri, 22 May 2020 11:08:44 -0400 Subject: [PATCH] more logging during account linking --- app/main/index.js | 7 ++++++- package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/main/index.js b/app/main/index.js index 2fc3b94..4993762 100644 --- a/app/main/index.js +++ b/app/main/index.js @@ -127,11 +127,15 @@ app.on('ready', async () => { }) ipcMain.on(AUTHORIZE, event => { + console.log(`getting Twitter auth url`) twitterPinAuth.requestAuthUrl(). then(url => { + console.log(`got Twitter auth url: ${url}`) event.returnValue = url + console.log(`opening browser tab at ${url}`) shell.openExternal(url) }).catch(err => { + console.error('error when getting Twitter auth url') console.error(err) }) }) @@ -139,6 +143,7 @@ app.on('ready', async () => { ipcMain.on(SEND_PIN, async (event, arg) => { let result = null try { + console.log(`getting access tokens for pin: ${arg.pin}`) const credentials = await twitterPinAuth.authorize(arg.pin) if (credentials) { // use keys to get the screenName of the authenticating user @@ -157,7 +162,7 @@ app.on('ready', async () => { } } } catch(e) { - console.error(e) + console.log('error when getting keys and settings', e) } event.returnValue = result }) diff --git a/package.json b/package.json index 124b1bd..cb0f150 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hydrator", - "version": "0.0.9", + "version": "0.0.10", "description": "A desktop utility to hydrate Twitter ID datasets.", "main": "init.js", "author": {