Login with Google V2

that’s Your test app… It’s not working! :smirk::pensive::confused:

Root cause: The URL https://scripts.thunkable.ga/google/oauth/ is dead.

Not found this url

I’ll fix it in a few days, as now I’m on vacation @Mavi

1 Like

I’ve been researching but haven’t fully understand this URL step. Should we create that URL by registering our app? Could you provide an easy-to-follow guide so we can create our own URL?

I had tried it in my app but the OAuth login is not successfully completed.
It comes to an window saying that it will get closed automatically and it doesn’t get closed and login is not successful
This is my screenshot of the problem

Te llegan mis mensajes? cada respuesta que escribo recibo el mail de “Mail Delivery Subsystem”! :weary:

Y cómo podemos hacer para tener el login de Google? :cry:

The key is JavaScript…

This is my method

  1. You must have a webpage that you host on the server which contains scripts for Initialize Facebook and Google JavaScript SDK, and also embed your API key and client ID there …

  2. Create new webviewer in your application and make it invisible, then load your page.

  3. Use the WebViewTools extension to run JavaScript and catch the result using setWebViewString, for example user clicked facebook login button :

FB.login(function (response) {
if (response.authResponse) {
window.AppInventor.setWebViewString("LoginSuccess="+ response.authResponse.accessToken);
} else {
window.AppInventor.setWebViewString("LoginCancelled");
} },
{scope: 'email'});

This script can only be called if you have initialized Facebook JavaScript SDK on your page, Like what I said at the first point… For Google login the method is the same.

  1. If you use WebViewTools, our invisible WebViewer will create a new window and bring up a login dialog, after we run the script above …

  2. And when the user succeeds or cancels the login, the login dialog will automatically close and WebViewStringChange will be called with the value we requested in JavaScript earlier …


~Skinzart~

1 Like

So the point is, request with javascript, and catch the result with “setWebViewString”…