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

Remove session from companion #4394

Open
2 tasks done
mifi opened this issue Apr 1, 2023 · 4 comments
Open
2 tasks done

Remove session from companion #4394

mifi opened this issue Apr 1, 2023 · 4 comments
Labels

Comments

@mifi
Copy link
Contributor

mifi commented Apr 1, 2023

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

Expected behavior

companion should not work because cookies and sessions are not in use

Actual behavior

everything actually works.

this means we can probably remove all session code in companion, as it will simplify companion code and we don't have to worry about things like CORS cookies, secure, same-site etc.

@arturi
Copy link
Contributor

arturi commented Apr 3, 2023

@ifedapoolarewaju could I ask your opinion here, please?

@ifedapoolarewaju
Copy link
Contributor

IIRC, cookies were primarily used for displaying/loading authenticated images on Uppy Client. So the use of Cookies are implicit, and maybe better tested if you check that (Google Drive, Dropbox, Instagram, One Drive, etc.) images load correctly despite disabling cookies.

I can't remember specifically which of the Providers needed it, but my first guess is Dropbox.

PS: So as not to cause a delay, I responded right away based off my fragile vague memory, and haven't done any in-depth look. If this doesn't suffice, I can take a closer look to properly jug my memory.

@arturi
Copy link
Contributor

arturi commented Apr 3, 2023

@ifedapoolarewaju thanks for the swift response! 🖤

@mifi
Copy link
Contributor Author

mifi commented Apr 19, 2023

I believe the set-cookie logic for thumbnails is here:

// some providers need the token in cookies for thumbnail/image requests

it's actually a separate cookie, e.g. uppyAuthToken--dropbox, so it doesn't use sessions at all. That's why thumbnails still work even though sessions don't work

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

No branches or pull requests

3 participants