Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refreshing token fails because options.user gets deleted too early #29

Open
znat opened this issue Oct 13, 2015 · 2 comments
Open

refreshing token fails because options.user gets deleted too early #29

znat opened this issue Oct 13, 2015 · 2 comments

Comments

@znat
Copy link

znat commented Oct 13, 2015

options.user is undefined here
https://github.com/percolatestudio/meteor-google-api/blob/master/google-api-async.js#L19

because it was deleted there
https://github.com/percolatestudio/meteor-google-api/blob/master/google-api-async.js#L43

As a result, when Meteor.user() is not available the token cannot refreshed.

@Gsuz
Copy link

Gsuz commented Nov 5, 2015

after about 30 minutes of inactivity I need to relog the user, is this connected?

@kodie
Copy link

kodie commented Jun 28, 2017

I'm having the same issue as Gsuz which is possible related to OP's issue.

Using version 1.0.3_1 of the plugin.

Exception in callback of async function: Error: [Error: failed [401] {  "error": {   "errors": [    {     "domain": "global",     "reason": "authError",     "message": "Invalid Credentials",     "locationType": "header",     "location": "Authorization"    }   ],   "code": 401,   "message": "Invalid Credentials"  } } ]

After logging back into the user, the token get's refreshed and everything is fine but it doesn't get automatically refreshed when passing options.user like it's supposed to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants