Page 1 of 1

Same Cookies for different users

Posted: Wed Apr 08, 2020 9:26 pm
by boot_rom
Hi, Salvador!
After several attempts, I was able to launch the component without errors. I wrote to you by email.
At this moment, I need to run my program with the same cookies for different users. I start a session, enter my username /password, work for a while, then close the program. After restarting, I already log in without entering username /password (session is stored and continues to work). Everything works for one user, but if I change the user account in Windows and run the same program, the session starts again. And I have to re enter my username and password.
I am trying set TCefRequestContextRef.New, GlobalCEFApp.RootCache and GlobalCEFApp.Cache to any ways. Still no result.
I use the last CEF4Delphi release, which uses CEF 79.
How can I solve this problem?
Thank you.

Re: Same Cookies for different users

Posted: Thu Apr 09, 2020 10:12 am
by salvadordf
Hi,

I just tested the MiniBrowser demo with 2 different Windows users and I see the same problem. :(

I guess Chromium encrypts the cookies using different keys for each Windows user and the browser discards the old cookie because it can't decrypt it.

I haven't tried this but perhaps you can use the code in the CookieVisitor demo to read all the cookie data with the first user and then set the cookies with that data when the second user tries to visit that page. All you need to do this is in the CookieVisitor demo.

Re: Same Cookies for different users

Posted: Sat Apr 11, 2020 5:16 pm
by boot_rom
Hi!
CookieVisitor demo really helped. Thank you :!: :!: :!: