Skip to content

Commit

Permalink
more logging during account linking
Browse files Browse the repository at this point in the history
  • Loading branch information
edsu committed May 22, 2020
1 parent e6f98c8 commit 9c9fd26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion app/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,23 @@ 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)
})
})

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
Expand All @@ -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
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 9c9fd26

Please sign in to comment.