Page 1 of 1

RequestContext authorization fails

Posted: Sun Jul 12, 2020 3:56 pm
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.

Re: RequestContext authorization fails

Posted: Mon Jul 13, 2020 9:06 am
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.

Re: RequestContext authorization fails

Posted: Mon Jul 13, 2020 9:37 am
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.