Google OAuth & Photos API Tutorial - Part Two: Google Login

This is part two of how to get Google photos into Wappler via the API. I don’t have much time so am going to show the basics and hope you can work it out from there.

  1. Create a new Server Action. I called mine api_google_login
  2. Create a step adding Google as an OAuth2 Provider
  3. Add your client id and secret in the relavent fields
  4. Add an OAuth2 Authorize
  5. Select Google as the Provider
  6. Add the Scopes you want to use.
    I’ve added:
  1. Add a button or link on your page which links directly to the server action you just created. Mine is like this - Google Login
  2. Your users will be shown a Google Login for your site like this…

I haven’t done anything with showing a logout button if the user is already logged in.

Next Up - Getting User Data

3 Likes

Part One - Google OAuth & Photos API Tutorial - Part One: Getting Credentials from Google

1 Like

Very interested in seeing your next parts, wish you had shared this a month ago when I was dealing with all this as it was quite a learning curve, but I eventually got there hooking into the gmail api.
Only thing I really want to see is how you handle the auth token and refresh token expiry.

Waiting anxiously for Part III !

Ha! I ended up not actually using this in my project, but did get it working. I’ll have a look back through my backups and see if I can put together a quick tutorial in the next few days.

I’m now interested in why you abandoned it? Found a better alternative? Or simply bailed out completely from using it? Went another route? :joy: Sorry too many questions.

For what I needed Cloudinary proved to be a FAR superior solution. https://cloudinary.com/solutions/cloudinary_for_developers

The upload and media library widgets are fairly easy to integrate and are really great.

Happy to give you some pointers if you think it’s something that might work for your use case.

Oh I see why you’d wanted to use that service, in my case I’m looking to do some social media video management website where I can authenticate YouTube channels into my service and let users upload videos to their channel from my service. Idk if what you used would be helpful to me. Do this service has all the batteries included?

I’ll have a look and see if what I had would be useful for you. Will get back to you in a day or two.

Just looking at what you need and I didn’t get as far as uploading. Sorry. I basically managed to show folders and then images in those folders. I had a quick look and the YouTube API for uploads seems to use Python which unfortunately I know nothing about. Good Luck!

2 Likes

Hi there Heather, thanks for going the extra mile, I did got to use the API and upload a test video but I ran into a lot of issues with wappler, nodejs and docker in general, I see that wappler is not a good fit for me at this current stage so I decided to migrate to Laravel. I got to the point that I can authenticate YouTube channels and upload videos there. Thank you so much anyways! :tada:

1 Like