Meteor-Files icon indicating copy to clipboard operation
Meteor-Files copied to clipboard

Cordova: downloadCallback this.userId is null; x_mtok on server side not set

Open sebastianspiller opened this issue 4 years ago • 2 comments

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 avatar Oct 04 '21 06:10 sebastianspiller

@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

dr-dimitru avatar Jun 08 '22 19:06 dr-dimitru

@sebastianspiller let me know if you were able to try, or what was your solution to solve this

dr-dimitru avatar Jun 29 '22 08:06 dr-dimitru

Closed due to silence at issue owner end. Feel free to reopen it in case if the issue still persists on your end.

dr-dimitru avatar Nov 03 '22 12:11 dr-dimitru