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.

RequestContext authorization fails

Post Reply
Student
Posts: 72
Joined: Tue Aug 07, 2018 9:20 am

RequestContext authorization fails

Post by Student »

Hi, I recently updated from 79 to 83 version of chromium, I noticed that the site has become does not remember authorization, this problem only occurs if I don't set the global cache GlobalCEFApp.Cache.
I set it just before creating the browser instance

Code: Select all

var Chromium1: TChromium;
     CEFWindowParent1: TCEFWindowParent; 
     rct: ICefRequestContext;

  CEFWindowParent1 := TCEFWindowParent.Create(panel);
  CEFWindowParent1.Parent := panel;
  CEFWindowParent1.Align := alClient;
  Chromium1 := TChromium.Create(panel);
  rct := TCefRequestContextRef.New('D:\TestCache', '', false, false, false);
  Chromium1.CreateBrowser(CEFWindowParent1, '', rct);
How to solve this problem? In the 79th version, there was no such problem.
User avatar
salvadordf
Posts: 4052
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: RequestContext authorization fails

Post by salvadordf »

Hi,

Chromium made some changes about the cookie storage and now we have to set the GlobalCEFApp.RootCache property before the GlobalCEFApp.StartMainProcess call in the DPR file.

All the cache directories of all the browsers must be a subdirectory of GlobalCEFApp.RootCache. This rule also applies to the cache directories in new request contexts.
Student
Posts: 72
Joined: Tue Aug 07, 2018 9:20 am

Re: RequestContext authorization fails

Post by Student »

salvadordf wrote: Mon Jul 13, 2020 9:06 am Hi,

Chromium made some changes about the cookie storage and now we have to set the GlobalCEFApp.RootCache property before the GlobalCEFApp.StartMainProcess call in the DPR file.

All the cache directories of all the browsers must be a subdirectory of GlobalCEFApp.RootCache. This rule also applies to the cache directories in new request contexts.
Thank you Salvador, it works, it turned out to be simple.
Post Reply