Clear cookies in UXP plugin

We are investigating setting up some automated testing for our Photoshop UXP plugin and one of the first hurdles is starting from a fresh state…is there anyway to clear out the cookies that are stored in UXP plugin (cookies that would be set via fetch calls to login, etc). Are they persisted in files that we can delete?

1 Like

isn’t it possible to store cookies in browsers only?

The photoshop UXP implementation, while not a browser, does implement an interface that very much mimics the browser for layout, rendering, and network…it does support cookies, which is how we are able to integrate with our existing web login workflow.

1 Like

oh, interesting! I wasn’t aware of that. Did not had the time to look through the Photoshop API yet.

I’m sure the cookies are in files you could delete, but I’m not familiar enough with the underlying implementation to give you good information about that at the moment. We do rely on the OS networking behavior, so on macOS, it’s likely the cookies are stored per-app, but you’d probably wipe out more than just your own cookies if you deleted any such files.

I can ask internally to see if there are any ideas.

2 Likes

That would be great @kerrishotts - in the case of automated testing, it probably doesn’t matter if we are blowing away all cookies - however, if there were a more surgical approach on a per plugin basis that would probably be helpful for support and debugging.

I have the same problem, do you have a solution?