Login with Google - Thunkable/AppInventor

Hi everyone :wave:
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

  2. Enable Google+ API (in Home>Library>Social Api>Google+ API)

  3. Add an OAuth verification screen (in Home>Credentials>OAuth Consent Screen)

  4. Request a new Web Credential, and fill the allower URL to your GoogleAuth folder’s path (in Home>Credentials>Credentials>Create Credentials>OAuth Client ID & Select Web application)

####WebServer optional

I recommend to use hostinger.es. 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



REFERENCE: GitHub
Video Instructions (just for server setup): YouTube

15 Likes

Thanks for sharing.:+1:

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

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

Thank you!
It works really good! :slight_smile:

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

1 Like

I downloaded Firebase sample and uploaded my test server

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/

Can you add easy Facebook and Twitter login ?

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

1 Like

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

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 and this 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.

1 Like

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

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

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

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

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

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?

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

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

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

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

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

1 Like

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