Ok, well here is where I got to …
I am using AUTH0 for the heavy lifting of signups, it makes it a little easier I think. Although I think you could do the Google one yourself. Auth0 means you can add multiple social signons if need be.
Bubble’s API connector doesn’t help us, as there isn’t a response, it is a redirect.
You can see it in action here…
So I have a button that redirects to an External URL (which is just the API).
This runs the Google Logon (via Auth0) and brings you back to page on my app.
Here is the first problem … Bubble won’t extract the parameters from the URL, because of the “#”
If we can solve that, then you take the Access Token (a JWT - JSON Web Token) and then somehow decode it.
Once decoded you get the Google logon details.
{
“_id”: “12bdf73a9ad1a2864b2cb13e842679cc”,
“email”: "blah.blah@gmail.com",
“email_verified”: true,
“name”: “Nigel Godfrey”,
“given_name”: “Nigel”,
“family_name”: “Godfrey”,
“picture”: “https://lh3.googleusercontent.com/-jc2JJe1jmrw/AAAAAAAAAAI/AAAAAAAAE9Y/vt56M6XVQOM/photo.jpg”,
“gender”: “male”,
“locale”: “en-GB”,
“clientID”: “trUqPQrbNmWYg2i1eNIwDpw4EychRGjq”,
“updated_at”: “2016-06-18T13:27:30.324Z”,
“user_id”: “google-oauth2|105343519765682720291”,
“nickname”: “nigel.godfrey”,
“identities”: [
{
“provider”: “google-oauth2”,
“access_token”: “ya29.CjAFA543zc2KtwCKclK2MT-jRwdQPrXV2whehkpKsX4VlWFd931v0C0OleVZesnaWM0”,
“expires_in”: 3599,
“user_id”: “105358519765682732291”,
“connection”: “google-oauth2”,
“isSocial”: true
}
],
“created_at”: “2016-05-13T12:01:44.053Z”,
“global_client_id”: “JoPNL9S8AHS232IlxcFeRxk70fkppihW”,
“iss”: “https://biij.eu.auth0.com/”,
“sub”: “google-oauth2|105358519765632720291”,
“aud”: “X4UqPQrb32WYgxi1eNIwDpw4EychRGjq”,
“exp”: 1466292450,
“iat”: 1466256450
}
You can then use the Access Token to call Google Calendar.
But for now that is a dead end, I can’t decode the token in bubble. And I doubt using an API is a good idea.
There is probably an AUTH0 plugin that bubble could use. I think this would be a useful way to get OAUTH working.