Login with Google V2

No, my GoogleLogin method just gets users email to use into your Login System in your app
You can’t use it for other external sites like feedly.com

Oh… , it seems I misunderstood it then…

So do you confirm that app inventor’s webview cannot login into sites like feedly using login with Google, using your extension?
Any other extension that you know help with this?

It seems it stuck in the middle of a redirection. And "Click here if your browser did not redirect you to feedly.com " seems returning me back to feedly but without logging me in.

Do you know a way to solve this?

Yep, you CAN’T
WebView doesn’t save cookies for long time. It isn’t a full browser


Nope, sorry

@Barreeeiroo
But, it seems OAuth protocol does not need cookies!

Honestly, I am testing with Google OAuth, because it is reputable and perhaps some of you guys needed it at some point of time.

But my real need is login in another service called hypothes.is which is an annotation and highlighter tool on webpages which recently began using OAuth as well.

One week ago their blog post stated:

Our new OAuth-based authentication replaces a cookie-based system , addressing recurring login issues experienced by some Hypothesis users. Now login is enabled for users whose browsers block “third-party” cookies in order to prevent advertisers from tracking them across the web or who use privacy extensions like Privacy Badger, which also block the use of third-party cookies on sites a user hasn’t visited. These users should no longer see those pesky “session is invalid” errors that block their authenticatione access.

Additionally, because we no longer use cookie-based authentication, we no longer need to ask for permissions that the Hypothesis application doesn’t really need in order to run correctly. So users will no longer be asked to grant unneeded permissions for geolocation, or camera or microphone access.

And this service has exactly the same issue like login with Google that I mentioned above. During the last step it should redirect to the original webpage and logged in, but unfortunately it is stuck on this last step, and if I force the browser to go to the original website (like feedly for the login using Google example), it will be not logged in.

So I thought your extension perhaps shades some light why it is that, and help me investigate how to solve it…

I am searching actively for a solution, since this service means A LOT for me…
If I find a way, certainly I will post the solution here…
It should solve all such issues like Login into a lot of sites using Google, Twitter, Facebook,…etc and my beloved hypothes.is service as well…

My original post showing hypothes.is issue and a simple .aia and .apk that you can playing with it here.

i am having the same problem . Did u come up wit some other alternative way withput clearing app cache.

Nope

could u help me out for authenticating user using google?
i tried taifun’s am extension but avatar and name were not showing while live testing.

it seems to be, you forgot to read the documentation at https://puravidaapps.com/accountmanager.php

The name will be extracted from the contacts of the device. In case there is no name available, empty string is provided.

The avatar image will be extracted from the contacts of the device. In case there is no avatar available, empty string is provided.

Taifun

1 Like

oops sorry …
i forgot.
thanks @Taifun

How would I store the “request” as a variable, since it’s in a url?

Wait. Nevermind. Found it.

I got your app, and it showing same results as you shown in screenshots.
Now I just wanted to allow user to my second screen after sucessfully login. So plz tell me which blocks I does not need.
and also want to store his data in firebase DB, Will you able to help?

I’m trying to logout users and it doesn’t work. When I click the logout button, it does all the blocks and changes the visibility and everything, but when I click the login button again, it does not bring up the OAuth screen, it just opens params, the listpicker. It clearly has kept the information and kept the user logged into the device. How do I log them out?

It works after I clear all the app data, but I don’t know how to do that in thunkable. Taifun said I need to use Tiny_DB.Clear All, but that doesn’t work. It only works if I clear all the app data in settings and then restart the app.

the TinyDB.ClearAll method obviously deletes only TinyDB, it seems to be, you are looking for something else… did you try the ClearCache method from the tools extension?
Taifun

The issue with the application isn’t the cache, I just need to clear the app data. My users cannot sign out from OAuth and clearing the app data makes the whole app work. Is there a way to do that?

you might want to write an extension using for example this snippet

more information about how to create an extension see the App Inventor Extensions document
however that will be more advanced and will require some Java skills…

Taifun

The .aia file to download seems broken… I cannot open it with AppInventor (I’m a very beginner :slight_smile: )

@mavi You probably can’t open it in app inventor because thunkable has some things that are newer, you can open app inventor projects in thunkable but you can’t vice versa
Try opening it in thunkable (Wich you should use over app inventor because it’s a lot better and has way more features)

YES! noticed that by just trying! hehe and indeed, I found out I like thunkable better over App Inventor!
And now I have another issue! I could see the blocks and learn the logic used. But when I want to execute it via the phone App for Thunkable, I get the error message:
Cannot find the component: LOGIN
Note: you will not see another error reported for 5 seconds.

What am I missing now? :frowning:

[Update] - I built it as .apk and installed on my phone. It compiles OK, and helped me understand the “Component: LOGIN missing” error - The URL that is being called (https://scripts.thunkable.ga/google/oauth/) is dead. How should I proceed?