Retrieving cookies from a Go webview


(Erik) #1

I’m writing a Go component, and I want to provide personal user login upon startup. This should ideally be done through a webview, which is pulled up when the program starts. This webview should connect to an identity server that is independent of my program. If a login is successful, a cookie containing access + refresh tokens are set in the response. At this point, I want the webview to close, and the tokens to be extracted from the cookies for use in the Go program.

I have tried to achieve this with the webview library zserge/webview. However, I have not found a way to extract cookies using this library. The builtin library net/http has functionality for retrieving cookies - however, the zserge/webview library does not seem to make use of the builtin net/http library.

Is it possible to do this?


(Lutz Horn) #2

Maybe open an issue and ask the people who wrote this library.