Meteor-Files
Meteor-Files copied to clipboard
Cordova: downloadCallback this.userId is null; x_mtok on server side not set
- ostrio:[email protected]
- Meteor 2.3.2
- Cordova ios/android
- Server issue
Hi there & thx for this great package!
I want to compare this.userId in downloadCallback with a group of users for authorization restriction, but this.userId is null. Debugging it down, I see that the http.request.Cookies object is empty {}, which is needed in the _getUser().
In ostrio:cookies, the route ?___cookies___=x_mtok.... is also set (and the function is triggered often). I receive responses with Set-Cookie: x_mtok back. But when requesting an image, the cookie isn't send with to the server.
I'm using the package with three FilesCollections. What can I configure? I tried to disableSetToken: true and implement my own Cookie, but with the same results.
Thank you for your response 😃
@sebastianspiller downloadCallback wasn't created for access control. There's another protected option I recommend to use protected to manage access control
Hope that helps. Let me know
P.S. I'm sorry for the late reply
@sebastianspiller let me know if you were able to try, or what was your solution to solve this
Closed due to silence at issue owner end. Feel free to reopen it in case if the issue still persists on your end.