Login with Google V2

Barreeeiroo
Sun, 25 Jun 2017 13:55:55 +0000
Promote your App

Hi there
Here is the new version of my Login with Google method

The other one is not working as Google blocks WebViewer since months ago

#Setup

Setup instructions can be found in original topic

Login with Google - Thunkable/AppInventor Promote your App

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 Register a new project in Google Developers Console [image] Enable Google+ API (in Home>Library>Social Api>Google+ API) [image] …

#How to manage data

Probably the most wanted and difficult feature

To get user’s data, first you need to authenticate them

1. For that, use a WebViewer that uses EWV extension to enale OAuth or a WVD extension

2. After enabling it, make the WebView to go to this URL: https://scripts.thunkable.ga/google/oauth/
It will create a Google OAuth page

3. Use a Clock to detect when the CurrentPageTitle goes to Logged in; because when you get that it’s because you have full access to user’s data

4. Now, to get user’s data, just make a WebView to go to this URL: https://scripts.thunkable.ga/google/oauth/?data=sth
Change the sth to what you want. The avaliable params can be found in the list of the app

5. And get the CurrentPageTitle to get that info

To logout users, just go to https://scripts.thunkable.ga/google/oauth/?logout

Of course, if you are using your own web server, use your URL instead of mine

You can also take a look to the app code to see how I’m managing data

If you are planning to use this for loging or signing users you will probably need the email

#Files

Google OAuth .ZIP: OAuth.zip (20 MB)

Google OAuth .AIA: OAuth.aia (67.1 KB)

Google OAuth .APK: OAuth.apk (2.3 MB)

#Screenshots

If you have any question or doubt, just ask

70 posts - 18 participants