# Login with Google - Thunkable/AppInventor

**URL:** https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348
**Category:** Promote your App
**Tags:** webviewer, socialmedia, google, oauth
**Created:** [October 26, 2016, 11:41am UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348 "2016-10-26T11:41:07Z")
**Posts on this page:** 20
**Page:** 1

<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: [October 26, 2016, 11:41am UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/1 "2016-10-26T11:41:07Z")

</div>

Hi everyone 👋  
As I promished yesterday, here it is an example of GoogleLogin with OAuth in AppInventor or Thunkable:

* * *

**First of all, you must know that it uses a webserver, but it’s not compulsory because I don’t mind to share mine**

It uses Google+ API, so the app doesn’t need any additional permissions

* * *

#Setup

####google Developer Console optional

1. Register a new project in [Google Developers Console](https://console.developers.google.com/iam-admin/projects)  

2. Enable Google+ API _(in [Home](https://console.developers.google.com/apis/dashboard)\>[Library](https://console.developers.google.com/apis/library)\>Social Api\>[Google+ API](https://console.developers.google.com/apis/api/plus/overview))_  

3. Add an OAuth verification screen _(in [Home](https://console.developers.google.com/apis/dashboard)\>[Credentials](https://console.developers.google.com/apis/credentials)\>[OAuth Consent Screen](https://console.developers.google.com/apis/credentials/consent))_  

4. Request a new Web Credential, and fill the allower URL to your GoogleAuth folder’s path _(in [Home](https://console.developers.google.com/apis/dashboard)\>[Credentials](https://console.developers.google.com/apis/credentials)\>[Credentials](https://console.developers.google.com/apis/credentials/consent)\>[Create Credentials\>OAuth Client ID](https://console.developers.google.com/apis/credentials/oauthclient) & Select Web application)_  

####WebServer optional

> I recommend to use [hostinger.es](http://api.hostinger.es/redir/18036516). It’s a free web hosting service.

1. Upload the files that I’ve attached in the files section
2. Open index.php file and add your credentials
3. Verify that everything is fine

####appinventor

1. Upload the .aia file
2. Change all URLs to your server’s URLs optional
3. Use the data as you want
4. Build the .APK

* * *

#USE THE VERSION 2

###[Login with Google V2](http://community.thunkable.com/t/login-with-google-v2/4826)

* * *
  

REFERENCE: [GitHub](https://github.com/googleplus/gplus-quickstart-php)  
Video Instructions _(just for server setup)_: [YouTube](https://www.youtube.com/watch?v=-65R420rIUA)

---

<div class="post-metadata">

### Author: ![Bruger](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Bruger](https://community.thunkable.com/u/Bruger)
#### Post date: [October 26, 2016, 11:52am UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/2 "2016-10-26T11:52:05Z")

</div>

Thanks for sharing.👍

---

<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: [October 26, 2016, 1:09pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/3 "2016-10-26T13:09:07Z")

</div>

Awesome Can you make extension? Maybe just one click login with Android account manager

---

<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: [October 26, 2016, 1:15pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/4 "2016-10-26T13:15:25Z")

</div>

That could be more difficult, because extensions are programmed in Java, and I don’t know too much that language

---

<div class="post-metadata">

### Author: ![Mika](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mika/32/5022_2.png) [@Mika](https://community.thunkable.com/u/Mika)
#### Post date: [October 26, 2016, 2:52pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/5 "2016-10-26T14:52:56Z")

</div>

Thank you!  
It works really good! 🙂

---

<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: [October 26, 2016, 4:03pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/6 "2016-10-26T16:03:32Z")

</div>

If you need any other user data, I can add it

---

<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 1, 2016, 7:52pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/7 "2016-11-01T19:52:57Z")

</div>

I downloaded Firebase sample and uploaded my test server

[http://goterror.lima-city.de/storage/](http://goterror.lima-city.de/storage/)

Can we get google user photo and upload photo to Firebase ? And get firebase url for download image and store login?

And firebase login [http://goterror.lima-city.de/auth/](http://goterror.lima-city.de/auth/)

Can you add easy Facebook and Twitter login ?

---

<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, 2016, 9:44pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/8 "2016-11-01T21:44:55Z")

</div>

1- You don’t need to upload user’s photo to firebase. You can simply store the image url and get it when you need it and display it

2- You have to setup the OAuth Keys to complete the authentication login.

3- I supose so, I’ve never tried it.

PD: I’m starting to develope Android Apps in Android Studio, and it’s easier than I supose, and also you can integrante lots of services of Firebase like messaging, notifications or login with a lot of services

---

<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 2, 2016, 11:16am UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/9 "2016-11-02T11:16:12Z")

</div>

I think about store image url but if google change url format or block me i need recall all photo url nvm Good luck thanks for tip

Edit:New update come with cloudniary i think its fix cloud storage problems

---

<div class="post-metadata">

### Author: ![Bruger](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Bruger](https://community.thunkable.com/u/Bruger)
#### Post date: [November 2, 2016, 11:40am UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/10 "2016-11-02T11:40:19Z")

</div>

Hi Ali\_Aydin

I am not sure if it is something you are looking for. Anyway, try watching this [https://www.youtube.com/watch?v=mkBq9Yt7a8s](https://www.youtube.com/watch?v=mkBq9Yt7a8s) and this [https://www.youtube.com/watch?v=YQdGYqb3StM](https://www.youtube.com/watch?v=YQdGYqb3StM) . You can change from TinyWebDB to Firebase and ignore the clock part. The users can upload image from their devices to Firebase and can download it as well.

---

<div class="post-metadata">

### Author: ![Jevin\_Studios](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@Jevin\_Studios](https://community.thunkable.com/u/Jevin_Studios)
#### Post date: [November 11, 2016, 5:46pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/11 "2016-11-11T17:46:05Z")

</div>

This is awesome. Thanks for sharing. Pure Vida makes you pay for their version. Thanks!

---

<div class="post-metadata">

### Author: ![Bruger](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Bruger](https://community.thunkable.com/u/Bruger)
#### Post date: [November 13, 2016, 7:42pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/12 "2016-11-13T19:42:04Z")

</div>

@barreeeiroo Should I select Android apps for Key restriction (see the image below)?

 ![](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/1X/4889c1e6e4bd959f5cf2772d229839efffd2eb9f.png) 

On the image below, how do I restrict my key?

 ![](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/1X/5e59a96670424e188786b03b671e3892aeaf47d3.png)

---

<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 13, 2016, 7:42pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/13 "2016-11-13T19:42:35Z")

</div>

No, you have to choose Web Application, not Android App

---

<div class="post-metadata">

### Author: ![Bruger](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Bruger](https://community.thunkable.com/u/Bruger)
#### Post date: [November 13, 2016, 7:48pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/14 "2016-11-13T19:48:06Z")

</div>

The first one (HTTP referrers (web sites)), right?

---

<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 13, 2016, 7:50pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/15 "2016-11-13T19:50:08Z")

</div>

But, what did you choose? Because you don’t have to restrict nothing if you choose WebApplication in OAuth Credential

Did you choose API Key? Or anything else?

---

<div class="post-metadata">

### Author: ![Bruger](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Bruger](https://community.thunkable.com/u/Bruger)
#### Post date: [November 13, 2016, 7:53pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/16 "2016-11-13T19:53:32Z")

</div>

I have followed what you wrote, but a bit confused. 😁

This is what I get after I am done with the last step.

 ![](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/1X/5e43fc15c26b60e6bd4fa7bccb2244f2659c5a76.png)

---

<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 13, 2016, 7:59pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/17 "2016-11-13T19:59:28Z")

</div>

There, you have to use the Web client 2, not the API Keys

---

<div class="post-metadata">

### Author: ![Bruger](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Bruger](https://community.thunkable.com/u/Bruger)
#### Post date: [November 13, 2016, 8:08pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/18 "2016-11-13T20:08:44Z")

</div>

OK, thanks. I should check it, right?. What about Web client (auto created by Google Service)? Should I check it as well?

 ![](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/1X/8f6cdea4f77195f1ac7fac930393eb1a2e0c88c0.png)

---

<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 13, 2016, 8:54pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/19 "2016-11-13T20:54:45Z")

</div>

This is because you created a project in Firebase, but you don’t have to check it

---

<div class="post-metadata">

### Author: ![Bruger](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@Bruger](https://community.thunkable.com/u/Bruger)
#### Post date: [November 13, 2016, 9:08pm UTC](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348/20 "2016-11-13T21:08:02Z")

</div>

Thank you very much. I will try setting it up again tomorrow, and may be get back to you with more questions.

[Next page](https://community.thunkable.com/t/login-with-google-thunkable-appinventor/348.md?page=2)
