Firebase sample not working

Hi,

The Firebase example is not working. I added keys properly, however when connecting I only see the program opening a browser (probably for authentication) but is not loaded. Besides that, is not possible to authenticate without opening the browser? This is definitely not elegant and professional for me to implement this in a program.

Thx

  1. Please set AdvFireBaseObjectDatabase.ExternalBrowser = true. This is a new requirement from Google.

    2) At least a one-time authentication & authorization is needed.  This is a fundamental security principle of OAUTH2 After this one-time authentication & authorization and access & refresh token is obtained, can be persisted and can be reused without further authentication.

Thx Bruno for prompt response. I will try it soon.

However, as mentioned before, it would be much nicer to avoid requiring the use to login using browser.

Maybe you had a look already at Grijjy's blog post and could implement a way to use their TgoGoogleSDK class (according to site works not only Android, but works also with Windows and iOS ; not sure about macOS).
https://blog.grijjy.com/2017/07/20/using-google-sign-in-for-firebase-sdk-on-android/



In our TMS VCL & FMX Cloud Pack, all access to cloud services is based on the OAUTH 2 implementation and all components build upon this common layer to do OAUTH2 based access control. This is a standard: https://oauth.net/2/ and is consistent on every platform.

Hello,
would you know help me how exactly do I get this information:

//  FAppKey = 'xxxxxxxxx';
//  FAppSecret = 'xxxxxxxxx';
//  FAppDatabase = 'xxxxxxxxx';

Hi,


Instructions to retrieve authentication credentials are available here:
http://www.tmssoftware.com/site/cloudkey.asp#GoogleFirebase
Unfortunately your information of nothing helped.
I had already found this information.
What I would really like (if it was not too much) is exactly where I can extract all the keys previously reported.
The FAppDatabase value should be set to the database name as displayed in the link from my previous message.

The instructions to generate a client id and secret which should be assigned to the FAppKey and FAppSecret respectively are found on the same page:
http://www.tmssoftware.com/site/cloudkey.asp#Google

After all the correct settings, it presents the problem below:
400.
 That?s an error.

Error: redirect_uri_mismatch

The redirect URI in the request, http://127.0.0.1:8889/, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/169002746094-34hqb5f78ukgs0j1gln65p3okpfcuboj.apps.googleusercontent.com?project=169002746094

Learn more

For knowledge:

The TMS components can only access if the google credential is informed of the type of application = other.
In the manual informs: application type = web application, but it does not work.

Please make sure that the redirect URI defined in the Google Console is identical to the value of the App.CallbackURL property of your cloud component in Delphi.

We are not aware of such an issue with the Google related components in TMS VCL Cloud Pack.
Do you see any error messages?

The error message is what was displayed in the previous message.

I configured exactly as it was informed in component = google.
I can send the prints if you want.

If the error says:


The redirect URI in the request, http://127.0.0.1:8889/, does not match the ones authorized for the OAuth client. 

That means that your callback URL configured in the Google dev console does not match the one you use in your application. The URL should be EXACTLY the same, including backslash etc ...  This is not an issue in our component, this is an issue in your config of the Google API.
Hi,

I've same problem but after view html error source , it redirect to http://127.0.0.1:8888
and after change to http://127.0.0.1:8888/ , I can login