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

[feat] Get secure and http only cookies #11330

Open
thewh1teagle opened this issue Oct 12, 2024 · 0 comments
Open

[feat] Get secure and http only cookies #11330

thewh1teagle opened this issue Oct 12, 2024 · 0 comments

Comments

@thewh1teagle
Copy link
Contributor

Describe the problem

Hi,

I would like to extract all cookies from the Tauri webview. Currently, using document.cookie doesn't include HTTP-only or secure cookies. Could you add an option to extract those as well on Windows/macOS/Linux?

Thanks!

Describe the solution you'd like

For instance when using playwright with page.cookies() I can get all the cookies.
Provide similar function on the webview instance.

Alternatives considered

No response

Additional context

You can try checking this by opening https://x.com/, logging in, and then attempting to extract all the cookies. You'll notice that some of them are missing.

amrbashir added a commit to tauri-apps/wry that referenced this issue Oct 16, 2024
lucasfernog added a commit to tauri-apps/wry that referenced this issue Oct 21, 2024
* feat: add `WebView::cookies` and `WebView::cookies_for_url`

closes #518
ref: tauri-apps/tauri#11330

* cookies -> getCookies in android

* fix macos build

* fix gtk blocking

* document why we don't use wait_for_async_operation

* change file

* implement cookies_for_url on macOS

* fmt

* fix macos impl

* actually use interval

* make it faster

* remove matching on path

* Apply suggestions from code review

Co-authored-by: Lucas Fernandes Nogueira <[email protected]>

* Apply suggestions from code review

---------

Co-authored-by: Lucas Nogueira <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant