Armax / Pokemon-GO-node-api

Pokemon GO api node.js library
MIT License
875 stars 198 forks source link

Cannot authenitcate with Google, even with App Password #267

Open meetmagdalene opened 6 years ago

meetmagdalene commented 6 years ago

I am unable to login using my Google account. Here is how I'm setting it up as in the example.js:

var a = new PokemonGo.Pokeio();

var username = '<google-username-here>';
var password = '<app-password-here>';
var provider = 'google';

var location = {
    type: 'name',
    name: process.env.PGO_LOCATION || 'Times Square'
};

a.init(username, password, location, provider, function(err) {
    if (err) throw err;

    console.log('1[i] Current location: ' + a.playerInfo.locationName);
    console.log('1[i] lat/long/alt: : ' + a.playerInfo.latitude + ' ' + a.playerInfo.longitude + ' ' + a.playerInfo.altitude);
});

And this is the console output:

I20171023-15:09:47.704(-5)? [i] Logging with user: <google-username>
I20171023-15:09:47.971(-5)? undefined
W20171023-15:09:47.975(-5)? (STDERR) /home/msher7184919/Sites/GoScanner/.meteor/local/build/programs/server/app/app.js:20
W20171023-15:09:47.976(-5)? (STDERR)     if (err) throw err;                                                 // 15
W20171023-15:09:47.977(-5)? (STDERR)              ^
W20171023-15:09:47.977(-5)? (STDERR) 
W20171023-15:09:47.978(-5)? (STDERR) Error: 403 error from server
W20171023-15:09:47.978(-5)? (STDERR)     at IncomingMessage.<anonymous> (/home/msher7184919/Sites/GoScanner/node_modules/gpsoauthnode/oauth.js:61:23)
W20171023-15:09:47.979(-5)? (STDERR)     at emitNone (events.js:72:20)
W20171023-15:09:47.980(-5)? (STDERR)     at IncomingMessage.emit (events.js:166:7)
W20171023-15:09:47.980(-5)? (STDERR)     at endReadableNT (_stream_readable.js:923:12)
W20171023-15:09:47.981(-5)? (STDERR)     at nextTickCallbackWith2Args (node.js:511:9)
W20171023-15:09:47.982(-5)? (STDERR)     at process._tickCallback (node.js:425:17)
=> Exited with code: 1

I do not have 2-step authentication on this particular google account, but I follew the steps in this issue here (#94) to set up an app password anyway and using the app password did not fix the issue.

Any thoughts or is this API dead?

billyriantono commented 5 years ago

I think we need to update the google auth libs. 😄

magewire commented 4 years ago

Same issue - is there a fix in place for this yet