Page 1 of 1

Always getting notif "Authentication error"

Posted: Fri May 29, 2020 3:22 am
by DraDewa
Hi,

i have create some app which use login to google, i have found this plugin and make me can go on, after i got stuck because when i use browser from delphi always getting error trust browser, anyway i glad for your work, thanks.

Now i got other problem, i always get popup message "Authentication error", but i got the access token and refresh token which i can use it for request API, why i got this error anyway? i have debug it, but i'm still confuse about it. I got this error when i build my own app and build app from demo.

Can you or anyone help me? where is the problem?

Thanks...

Re: Always getting notif "Authentication error"

Posted: Fri May 29, 2020 12:51 pm
by salvadordf
Hi,

I just did a simple OAuth demo and I don't consider myself as an expert in that field but I guess there could be several problems.

If I remember correctly, you have to create your Google credentials for "native" applications and you have to select the right "scope" in your application for the service you want to access.

You have to add the token in the "Authorization" HTTP header and it's only valid for some time.

Read the code comments and the liked documents for more information :
https://github.com/salvadordf/CEF4Delph ... terFrm.pas

Try the OAuth2Tester demo to see if it works with your credentials.