I'm working with webview to write a plugin to help designers to export artboards towards a whiteboard solution (especially to share userflows and get reviews). Webview is really fine to keep using sketch without being blocked.
I finished it at 90%, nevertheless I'm facing a last challenge (and mandatory).
Before exporting, users must authenticate with basic auth. or SSO (it depends the auth. policy). Authenticating with SSO opens a specific webview and the user authenticates with his account on this context. Once finished, the session cookie is saved on the local storage.
However, the plugin only sends request (via fetch API) and takes the session cookies from
NSHTTPCookieStorage. The right session cookie is always on the local storage.
I'm looking for something to retrieve session cookies from the local storage. Those sessions cookies are HttpOnly, so, I can't retrieve them by using
I tried to retrieve them by using the
WKWebsiteDataStore object, but I'm not comfortable with cocoascript 😅:
-> return an error because an argument is missing at getAllCookies()
Thank in advance for your help 😃