Page 2 of 2

Re: Google refusing login

Posted: Fri Jan 03, 2020 7:58 pm
by salvadordf
At this moment we don't have a CEF4Delphi demo showing how to authenticate with OAuth.

There seems to be many examples for TWebBrowser when you search "delphi oauth2 twebbrowser example" in google that we could use to create a demo.

I'll try to find some time to do it but it could take some days/weeks because I'm very busy right now. :oops:

Re: Google refusing login

Posted: Sat Jan 04, 2020 9:25 am
by salvadordf
This repository has a component to login in google with oauth :
https://github.com/googleapi/googleapi

I haven't tested it and it hasn't been updated in several years but it's promising.

Re: Google refusing login

Posted: Tue Jan 07, 2020 12:16 pm
by thefunkyjoint
Thanks Salvador, will check it now !

Re: Google refusing login

Posted: Mon Jan 13, 2020 3:02 pm
by salvadordf
Please, download the latest CEF4Delphi from GitHub.

It has a new OAuth2Tester demo that might be what you need. Read the code comments in that demo because you will need to create some "credentials" in the "Google API Console" to see some results.

That demo uses the system browser to login. When the user has been identified it sends an "access token" used in the REST API requests.

I tried to use that token while navigating to youtube.com or google.com with TChromium but it was ignored by the server and it showed the contents as an unidentified user.

Re: Google refusing login

Posted: Fri May 06, 2022 12:22 am
by timkieu
This can bypass simply by using UserAgent string similar to Chromium/Chrome/FireFox/Edge as I tested on CEF for QT, CEF4Delphi all successfully.
This test code on 6/5/2022 is SUCCESSFUL with the FMXTabbedOSRBrowser project. You can check for any Windows CEF4Delphi apps.

Code: Select all

GlobalCEFApp.UserAgent := 'Mozilla/5.0 (Windows NT 10.0; rv:100.0) Gecko/20100101 Firefox/100.0';
NOTE: You should type your Google account and password, do not copy paste.