-
Notifications
You must be signed in to change notification settings - Fork 30
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
Error: ... Use this.userId in publish functions #10
Comments
Hi @jiku - The package assumes you are running in a method call (so it knows which user's credentials to use when talking to google). Can you try I don't think there's any way that from inside a library we can detect that we are running in the context of a publish function, so we'll need you to pass the user in no matter what. We should document this better I think. |
Thanks, that fixed it. =) |
I'm not sure what you mean @jiku ? |
Sorry, should've added some context
I'm not that proficient with Meteor/Node yet, so it's a bit unclear to me if this became an issue with meteor/meteor#1703 |
Cool. :) I made a PR if that's useable. |
Is this issue supposed to be closed @jiku? I'm getting the [Error: Meteor.userId can only be invoked in method calls. Use this.userId in publish functions.] error in my publish-functions, and when I try to implement your code I get a 500 error regarding refreshtokens. |
With
I get
When using GoogleApi in a package. Any ideas? Tried with a clean 1.0.5 app and package X. Only dependencies in package X are what's needed to log in to Google, which it does just fine. Tests run fine too. I'm using the same credentials successfully in other apps, so I'm pretty sure it's not a permissions, scope, etc, problem.
The text was updated successfully, but these errors were encountered: