GetAuthCredentials not getting called windowless browser

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

GetAuthCredentials not getting called windowless browser

Postby ramjana » Wed Dec 16, 2020 12:37 am

Hi Experts!
Trust all in good health :)

I have a C++ application where we are trying to integrate with Microsoft OneDrive. The application has a windowless popout browser that loads the OneDrive file picker.

The integration works well when we try to login to MS without proxy. But I does not work with proxy enabled. I have attached the fiddler trace. One thing I have noticed is I do not see GetAuthCredentials function getting called when we have the proxy enabled. I am using cef 85.3.6(it used to work fine in cef 73).
I tried setting up the flag
Code: Select all
command_line->AppendSwitchWithValue("disable-features", "NetworkService");
. But still it does not work with proxy enabled.

Also It works when we render the MS url on a normal cefbrowser (not windowless).

Kindly suggest if I could be missing anything.
Attachments
Ceferror.JPG
Ceferror.JPG (152.57 KiB) Viewed 3619 times
ramjana
Techie
 
Posts: 15
Joined: Fri Aug 14, 2020 4:08 am

Re: GetAuthCredentials not getting called windowless browser

Postby amaitland » Wed Dec 16, 2020 1:22 am

You cannot disable the network service anymore.

What does your GetAuthCredentials implementation look like? Did you update the signature? Do you have override set on your methods to catch signature changes?

https://github.com/chromiumembedded/cef ... 4b93c07280
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: GetAuthCredentials not getting called windowless browser

Postby ramjana » Wed Dec 16, 2020 2:07 am

Thank you amaitland for the reply.

Below is how the function signature and definition looks like,

Code: Select all
bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,
                                const CefString& origin_url,
                                bool isProxy,
                                const CefString& host,
                                int port,
                                const CefString& realm,
                                const CefString& scheme,
                                CefRefPtr<CefAuthCallback> callback) override;




Code: Select all
bool ClientHandler::GetAuthCredentials(CefRefPtr<CefBrowser> browser,
                                           const CefString& origin_url,
                                           bool isProxy,
                                           const CefString& host,
                                           int port,
                                           const CefString& realm,
                                           const CefString& scheme,
                                           CefRefPtr<CefAuthCallback> callback)
    {
        if (isProxy)
        {
            mScfProxyHandler->getAuthCredentials(host, callback);
            return true;
        }
        else
        {
            if (const auto lockedDelegate = delegate_.lock())
            {
                lockedDelegate->OnAuthenticationCredentialsRequired(host, callback);
                return true;
            }
            return false;
        }
    }
ramjana
Techie
 
Posts: 15
Joined: Fri Aug 14, 2020 4:08 am

Re: GetAuthCredentials not getting called windowless browser

Postby amaitland » Wed Dec 16, 2020 2:36 am

Is your GetAUthCredentials implementation triggered when isProxy is false? Say visit http://httpbin.org/#/Auth/get_basic_aut ... ___passwd_

M85 is no longer supported, are you able to test with a supported version? https://bitbucket.org/chromiumembedded/ ... -supported

Testing with cefclient is also something I'd look at https://github.com/chromiumembedded/cef ... er.cc#L735 t
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: GetAuthCredentials not getting called windowless browser

Postby ramjana » Wed Dec 16, 2020 3:50 am

Yes, GetAUthCredentials implementation is triggered when isProxy is false. What I noticed is, It does not gets called when I try to render the url on a windowless browser. For a windowless browser, it does not trigger GetAUthCredentials implementation at all.

Code: Select all
// Window info
        CefWindowInfo window_info;
window_info.SetAsWindowless(NULL);
ramjana
Techie
 
Posts: 15
Joined: Fri Aug 14, 2020 4:08 am

Re: GetAuthCredentials not getting called windowless browser

Postby ramjana » Thu Dec 17, 2020 3:06 am

Tried on the latest CEF version(CEF 87.1.12). Still the same issue. Is this know to anyone specifically with MS graph API?
I am using a window less browser
Attachments
6ffd9dcb-a2a7-4bac-921f-cf89cacab305.PNG
6ffd9dcb-a2a7-4bac-921f-cf89cacab305.PNG (362.26 KiB) Viewed 3587 times
ramjana
Techie
 
Posts: 15
Joined: Fri Aug 14, 2020 4:08 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 57 guests