percolatestudio / meteor-google-api

A simple API encapsulating some common patterns regarding Google's APIs
https://atmospherejs.com/percolate/google-api
MIT License
48 stars 30 forks source link

Question: 'Refresh token not found.' Error on all API Calls #25

Closed etyp closed 8 years ago

etyp commented 8 years ago

I consistently get Refresh token not found. on all attempted method calls. I'm using the connectWith package to add the Google service to accounts that choose to link.

It seems like refreshToken is never stored in user.services.google (checked on server debug, client debug and even straight from the mongo shell).

I tried switching over to just create a completely new user account with the Meteor.loginWithGoogle method and again, refreshToken is never stored. Can you help me to understand how to get that initial refreshToken so they can be exchanged in the future?

Note: I've also tried removing my Google API app from the Google accounts I'm developing with but still, no luck.

etyp commented 8 years ago

Solved: In order to receive the refreshToken on Google oAuth, I needed to make sure that Meteor.loginWith<ExternalService> had the requestOfflineToken set to true.

Please close the issue - sorry about that.