Closed LASkuma closed 6 years ago
Could you manage to make this work? beacuse i'm unable to get the correct ApiEndpoint with the token generated from your link
It works properly here. Are you using it locally or on your server?
I copy-paste your link in the browser, log in with my account, copy-paste the generated token and replace in poke.io.js that token instead of calling self.GetAccessToken and getting the token from the callback. If i use the google login of the library, the self.GetApiEndpoint works fine.
Im running the node server locally
You cannot simply replace the access token with the AuthCode because they are different. Instead, you should call self.initWithGoogleAuthCode.
Oh, so in logins.js, i have to replace data.masterToken for the token of the access token that i already got from google?
You don't need to change anything. Just call pokeio.initWithGooleAuthCode(yourToken, yourlocation, callback). Everything, including access token and api endpoint, will be setup automatically for you.
Ohhhh my bad, i have the poke.io.js wich not has your method initWithGooleAuthCode implemented. I will replace it. Ty!!
You can try my fork of this library. https://github.com/LASkuma/Pokemon-GO-node-api
I will, thank you very much!
Hey, Hi again. Did you manage to renew the token when the user logs in with google? i'm having a hard time with this. Renewing token with username and password is easy, but with google is not, as it would requiere the user to relog and generate a new AuthToken
Actually it's much easier than username/password token refreshing. I can implement it when I have time if you want.
Don't worry...i end up sending username and password in every request to init the poki.io instance
@LASkuma were u able to deploy the project somewhere? i'm having a hard time with this...neither AWS or Heroku seems to work
I use krypt.
Sent from my iPhone
On Aug 31, 2016, at 09:27, marvi14 notifications@github.com wrote:
@LASkuma were u able to deploy the project somewhere? i'm having a hard time with this...neither AWS or Heroku seems to work
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@LASkuma will give it a try. Thank you!
@LASkuma there´s any guide or documentation to deploy to Krypt? because i didn't see anything. In addition, there is a free plan there? or only paid plans?
There are only paid plans. You can deploy in the same way as AWS.
Sent from my iPhone
On Aug 31, 2016, at 11:09, marvi14 notifications@github.com wrote:
@LASkuma there´s any guide or documentation to deploy to Krypt? because i didn't see anything. In addition, there is a free plan there? or only paid plans?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@LASkuma great! Thank you
When you deploy products on a server, usually clients cannot login with their email and password since it would be blocked by google as suspicious logins. It's also lack of safety if SSL is not implemented on the server. By adding this feature, developers can put this link onto their app and let user provide the authorization code returned by google to login into their applications.
https://accounts.google.com/o/oauth2/auth?client_id=848232511240-73ri3t7plvk96pj4f85uj8otdat2alem.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=openid%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email