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.

Authorization in google

igor666
Posts: 64
Joined: Fri Feb 08, 2019 1:25 pm

Authorization in google

Post by igor666 »

Hello. The question of authorization in Google, recently problems with authorization have begun, Google writes that the browser is not safe. Judging by what Google writes in the help in CEF, now you need to log in via oauth2. I would like to know if there are other ways to get around this limitation? I looked at your oauth2tester example, but have not yet figured out how to apply it in a project, for example, when a user needs to log in to YouTube. Yes, and I would not really want to be tied to the Google application. I will be very grateful for advice.
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Authorization in google

Post by salvadordf »

Hi,

Read this and the information in the liked threads :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=1488

Last time I checked the OAuth2 method can only be used to access the Google APIs and not to authenticate into a web page.

Try enabling the Chrome runtime mode. Open the MiniBrowser demo and add this line to the CreateGlobalCEFApp procedure :

Code: Select all

GlobalCEFApp.ChromeRuntime := True;
Then run MiniBrowser and try to login.

The Chrome runtime mode is still in experimental state and some features are not fully implemented.
igor666
Posts: 64
Joined: Fri Feb 08, 2019 1:25 pm

Re: Authorization in google

Post by igor666 »

The user himself must log into his account, in my application this is exactly what is needed, the problem is that Google does not allow this to be done, it says "the browser is not safe". As for the ChromeRuntime mode, I have been following it for a long time, in which the entrance is carried out without problems. But unfortunately in this mode a number of functions that are used in my application do not work yet.
If it's not a secret, how do you manage to log into your Google account in your browser, oauth2? True, in some cases it is not possible to do this in your browser, if you are interested, I can share my observations and describe the procedure, which also leads to the message that the browser is not safe :).
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Authorization in google

Post by salvadordf »

BriskBard doesn't do anything special or secret. It just implements many TChromium events and tries to have all the features found in other browsers.

Other applications should be able to replicate what BriskBard does. It can change the user agent for some websites but that trick no longer works for Google.

However, I just tried to login with 2 different accounts and I get the same "the browser is not safe" message.
igor666
Posts: 64
Joined: Fri Feb 08, 2019 1:25 pm

Re: Authorization in google

Post by igor666 »

Strange, I was able to log into my account without any problems, I attached a screenshot. Apparently Google itself cannot determine CEF yet with 100% certainty :). And in my application, this began relatively recently, before that, Google allowed me to enter.
OK, thank you very much for your help, I'll try to look at the headers and post data, maybe I'll notice something, although I think a lot of people have tried it before me :).I will also try to study oauth2, maybe it will be possible to do authorization through it. Anyway, Google itself refers to it.
You do not have the required permissions to view the files attached to this post.
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: Authorization in google

Post by dilfich »

Mobile user agent, but this is such an option
igor666
Posts: 64
Joined: Fri Feb 08, 2019 1:25 pm

Re: Authorization in google

Post by igor666 »

I tried the mobile user agent, unfortunately it did not help.
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: Authorization in google

Post by dilfich »

I don't need it, I just tried it in the MiniBrowser and there was no error message.
igor666
Posts: 64
Joined: Fri Feb 08, 2019 1:25 pm

Re: Authorization in google

Post by igor666 »

What user agent did you use? I also tried in the minibrowser, but it didn't work for me. Either the user agent matters, or Google somehow randomly displays this message.
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: Authorization in google

Post by dilfich »

Perhaps by accident. The pre-installed two I tried in devtools also did not work, I found in Google from the iPhone \ chrome and mozilla and authorization passed with them. I installed it manually, there is a procedure in the demo, although there is also an installation via the api
Post Reply