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
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
For that, use a WebViewer that uses EWV extension to enale OAuth or a WVD extension
After enabling it, make the WebView to go to this URL: https://scripts.thunkable.ga/google/oauth/
It will create a Google OAuth page
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
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
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
#Screenshots
If you have any question or doubt, just ask
15 Likes
Unable download or test it because your website suspended.
Can you upload them to other location like google drive or dropbox
The website will be online again in 15 hours
I can’t download it too, but when it becames online again I will re-upload the files to GoogleDrive
Nope, that’s the old one
Now I’m on a trip
When I get home I will upload the correct one to GDrive
1 Like
Thanks succesfuly work
Can i get mutliple information about user with one request
I try name&email but its not work
Use two WebComponents, save the first output in a variable and then join it with the second response
I found easy way to get all data
Just used userinfo.profile scope
Hahaha
Do you know how can i copy informations to variable.I m unable find it
I want store users informations on list.And store list using tinydb or other storage companents
Webview show user informations but i cant find way copy it to variable or list
The WebView.Title
block gives you the output
Just join it with a variable or whatever
Did you test it with no parameter(userinfo.profile),Its work for id,email or other parameters but not work for my method
I hadn’t thought about how to handle it…
I just added that function thinking about using it visually
I will add it to the WebView.Title tomorrow too so
Okey waiting for it.If you can send changed file its better for me because already uploaded files and ı dont want reupload same files (its takes more time)
I can’t do it now, I’m a bit busy
I will do it in 16 hours more or less
1 Like