Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Same Cookies for different users

Post Reply
boot_rom
Posts: 2
Joined: Tue Apr 07, 2020 8:26 am

Same Cookies for different users

Post 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.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Same Cookies for different users

Post 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.
boot_rom
Posts: 2
Joined: Tue Apr 07, 2020 8:26 am

Re: Same Cookies for different users

Post by boot_rom »

Hi!
CookieVisitor demo really helped. Thank you :!: :!: :!:
Post Reply