# Login with Google V2

**URL:** <https://community.thunkable.com/t/login-with-google-v2/4826>\
**Category:** Promote your App\
**Tags:** google, oauth, aia, login\
**Created:** [June 25, 2017, 1:55pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826 "2017-06-25T13:55:55Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Barreeeiroo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/barreeeiroo/32/17867_2.png) [@Barreeeiroo](https://community.thunkable.com/u/Barreeeiroo)\
**Post date:** [November 1, 2017, 1:16pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/41 "2017-11-01T13:16:18Z")

</div>

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](http://feedly.com)

---

<div class="post-metadata">

**Author:** ![Haider\_Alwasiti](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/haider_alwasiti/32/66198_2.png) [@Haider\_Alwasiti](https://community.thunkable.com/u/Haider_Alwasiti)\
**Post date:** [November 1, 2017, 1:47pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/42 "2017-11-01T13:47:05Z")

</div>

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](http://feedly.com) " seems returning me back to feedly but without logging me in.

Do you know a way to solve this?

---

<div class="post-metadata">

**Author:** ![Barreeeiroo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/barreeeiroo/32/17867_2.png) [@Barreeeiroo](https://community.thunkable.com/u/Barreeeiroo)\
**Post date:** [November 1, 2017, 5:47pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/43 "2017-11-01T17:47:37Z")

</div>

> [@Haider\_Alwasiti](#):
>
> So do you confirm that app inventor’s webview cannot login into sites like feedly using login with Google, using your extension?

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

* * *

> [@Haider\_Alwasiti](#):
>
> Any other extension that you know help with this?

Nope, sorry

---

<div class="post-metadata">

**Author:** ![Haider\_Alwasiti](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/haider_alwasiti/32/66198_2.png) [@Haider\_Alwasiti](https://community.thunkable.com/u/Haider_Alwasiti)\
**Post date:** [November 1, 2017, 7:16pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/44 "2017-11-01T19:16:04Z")

</div>

> [@Barreeeiroo](#):
>
> Yep, you CAN’T  
> WebView doesn’t save cookies for long time. It isn’t a full browser

@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](https://web.hypothes.is/) which is an annotation and highlighter tool on webpages which recently began using OAuth as well.

One week ago their[blog post](https://web.hypothes.is/blog/leaving-cookies-for-oauth-authentication/) 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](http://community.thunkable.com/t/webviewer-login-into-hypothes-is-bookmarklet-gives-blank-page/9957/3).

---

<div class="post-metadata">

**Author:** ![Shubham\_Soni](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Shubham\_Soni](https://community.thunkable.com/u/Shubham_Soni)\
**Post date:** [November 7, 2017, 2:49pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/45 "2017-11-07T14:49:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ali\_Aydin](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ali_aydin/32/7989_2.png) [@Ali\_Aydin](https://community.thunkable.com/u/Ali_Aydin)\
**Post date:** [November 7, 2017, 6:29pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/46 "2017-11-07T18:29:44Z")

</div>

Nope

---

<div class="post-metadata">

**Author:** ![Shubham\_Soni](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Shubham\_Soni](https://community.thunkable.com/u/Shubham_Soni)\
**Post date:** [November 7, 2017, 6:38pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/47 "2017-11-07T18:38:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Taifun](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/taifun/32/1547_2.png) [@Taifun](https://community.thunkable.com/u/Taifun)\
**Post date:** [November 7, 2017, 7:00pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/48 "2017-11-07T19:00:23Z")

</div>

> [@Shubham\_Soni](#):
>
> 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 [App Inventor Extensions: Account Manager | Pura Vida Apps](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

---

<div class="post-metadata">

**Author:** ![Shubham\_Soni](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Shubham\_Soni](https://community.thunkable.com/u/Shubham_Soni)\
**Post date:** [November 7, 2017, 7:04pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/49 "2017-11-07T19:04:45Z")

</div>

oops sorry …  
i forgot.  
thanks @Taifun

---

<div class="post-metadata">

**Author:** ![Flyer\_95](https://avatars.discourse-cdn.com/v4/letter/f/41988e/32.png) [@Flyer\_95](https://community.thunkable.com/u/Flyer_95)\
**Post date:** [November 10, 2017, 10:16pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/50 "2017-11-10T22:16:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Flyer\_95](https://avatars.discourse-cdn.com/v4/letter/f/41988e/32.png) [@Flyer\_95](https://community.thunkable.com/u/Flyer_95)\
**Post date:** [November 10, 2017, 10:17pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/51 "2017-11-10T22:17:07Z")

</div>

Wait. Nevermind. Found it.

---

<div class="post-metadata">

**Author:** ![Gudguy](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Gudguy](https://community.thunkable.com/u/Gudguy)\
**Post date:** [November 28, 2017, 11:09am UTC](https://community.thunkable.com/t/login-with-google-v2/4826/52 "2017-11-28T11:09:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ninja47billion](https://avatars.discourse-cdn.com/v4/letter/n/c0e974/32.png) [@ninja47billion](https://community.thunkable.com/u/ninja47billion)\
**Post date:** [March 20, 2018, 9:51pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/53 "2018-03-20T21:51:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ninja47billion](https://avatars.discourse-cdn.com/v4/letter/n/c0e974/32.png) [@ninja47billion](https://community.thunkable.com/u/ninja47billion)\
**Post date:** [March 20, 2018, 10:18pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/54 "2018-03-20T22:18:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Taifun](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/taifun/32/1547_2.png) [@Taifun](https://community.thunkable.com/u/Taifun)\
**Post date:** [March 20, 2018, 11:47pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/55 "2018-03-20T23:47:12Z")

</div>

> [@ninja47billion](#):
>
> 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.

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](https://puravidaapps.com/tools.php)?  
Taifun

---

<div class="post-metadata">

**Author:** ![ninja47billion](https://avatars.discourse-cdn.com/v4/letter/n/c0e974/32.png) [@ninja47billion](https://community.thunkable.com/u/ninja47billion)\
**Post date:** [March 21, 2018, 6:49pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/56 "2018-03-21T18:49:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Taifun](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/taifun/32/1547_2.png) [@Taifun](https://community.thunkable.com/u/Taifun)\
**Post date:** [March 21, 2018, 7:43pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/57 "2018-03-21T19:43:11Z")

</div>

> [@ninja47billion](#):
>
> Is there a way to do that?

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

> <https://stackoverflow.com/questions/6134103/clear-applications-data-programmatically/9073473#9073473>

more information about how to create an extension see the [App Inventor Extensions document](http://ai2.appinventor.mit.edu/reference/other/extensions.html)  
however that will be more advanced and will require some Java skills…

Taifun

---

<div class="post-metadata">

**Author:** ![Mavi](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Mavi](https://community.thunkable.com/u/Mavi)\
**Post date:** [August 23, 2018, 11:27pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/58 "2018-08-23T23:27:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Lemo\_Assistant](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@Lemo\_Assistant](https://community.thunkable.com/u/Lemo_Assistant)\
**Post date:** [August 25, 2018, 6:04am UTC](https://community.thunkable.com/t/login-with-google-v2/4826/59 "2018-08-25T06:04:27Z")

</div>

@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)

---

<div class="post-metadata">

**Author:** ![Mavi](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Mavi](https://community.thunkable.com/u/Mavi)\
**Post date:** [August 27, 2018, 10:00pm UTC](https://community.thunkable.com/t/login-with-google-v2/4826/60 "2018-08-27T22:00:39Z")

</div>

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? ☹

[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/](https://scripts.thunkable.ga/google/oauth/)) is dead. How should I proceed?

[Previous page](https://community.thunkable.com/t/login-with-google-v2/4826.md?page=2)

[Next page](https://community.thunkable.com/t/login-with-google-v2/4826.md?page=4)
