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

Cookies Support #3908

Open
leaanthony opened this issue Nov 23, 2024 · 5 comments
Open

Cookies Support #3908

leaanthony opened this issue Nov 23, 2024 · 5 comments
Labels
blocked Progress on the issue has been blocked Enhancement New feature or request

Comments

@leaanthony
Copy link
Member

leaanthony commented Nov 23, 2024

We would like to support cookies but this will require support for cookies over custom protocols in the upstream projects.

Related tickets:

@leaanthony leaanthony added Enhancement New feature or request blocked Progress on the issue has been blocked labels Nov 23, 2024
@stffabi
Copy link
Collaborator

stffabi commented Dec 2, 2024

Managing Cookies from the Go-Side should be possible on all platforms. I've already added some preliminary support in a v3 branch.

@pavelbinar
Copy link
Contributor

I think the main challenge here is to make the cookies work in the browser/web-view. The most of the authentication services like https://clerk.com/, https://workos.com/,.. are storing authentication tokens in the cookies therefore they does not work in the Wails.

@leaanthony
Copy link
Member Author

leaanthony commented Dec 3, 2024

It's true, a lot of the JS libraries that use cookies try and set them on the browser side directly. The lack of upstream support for cookies or cookies over custom schemes is frustrating. I'm not sure how to resolve that right now but am open to suggestions.

@pavelbinar
Copy link
Contributor

I’m not sure how much you can tap into the WebView events, but if you’re able to intercept the get and set cookie calls, we could monkey-patch that by using localStorage in the background. However, the browser call would still be for cookies.

@leaanthony
Copy link
Member Author

Isn't cookie manipulation done via setting document.cookie directly? There may be a way of intercepting the setting though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Progress on the issue has been blocked Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants