Reputation:
I built a App (CefSharp Browser) and I'm trying to share login Session cookies, But when I open the App on another device, the cookies don't work.. and it asks to log in again. What I want to do is share cookies without revealing my password .. When the cookies expire I renew them again and so on.
This is what I have done so far.. I created a folder (Temp) to save cookies on disk only for testing
var path = "C:\\";
var folder = Path.Combine(path, "Temp");
Directory.CreateDirectory(folder);
Then I created a cookie path
CefSettings settings = new CefSettings();
string path1 = "C:\\Temp\\";
settings.CachePath = path1;
Cef.Initialize(settings);
and then
ِC1 = new ChromiumWebBrowser("https://subscene.com/");
Panel1.Controls.Add(C1);
C1.Dock = DockStyle.Fill;
When I transfer Temp folder cookie to another device, it does not work ... I don't know the correct way to share cookies.. And I really need it Thanks in advance
Upvotes: 0
Views: 859
Reputation: 4420
For security reasons cookies are encrypted in Chromium. On Windows DPAPI is used.
As part of the goal of protecting private user information, this encrypts the cookie values on operating systems with user-specific crypto APIs and that do not otherwise protect this data
As per https://codereview.chromium.org/24734007
Cookies cannot be read on a different device for security reasons.
Upvotes: 1