Spring Boot 3 + OAuth 2 = YouTube!

Greg L. Turnquist
6 min readMay 18, 2022

One of the coolest things people reach for in building web apps, is off loading authentication to one of the three biggies: Facebook, Twitter, or Google.

Why maintain a list of users when there is someone else (with considerably bigger budgets) ready to do that for you?

So as part of my latest book writing endeavor, I wanted to dig in and show you The Way. Spring Boot 3 + Spring Security’s amazing OAuth 2.0 support!

Before we can move forward, there’s a little something YOU have to do. And that’s create “an app” in Google. This is the part, where you tell Google about your app, and they give you credentials. It’s not hard. Just…tedious.

  1. Go to Google Cloud’s dashboard.
  2. Click on the drop down right next to Google Cloud Platform and then hit New Project. Accept the default values.
  3. Select your new project so it’s showing in the dropdown at the top.
  4. On the left-hand panel, scroll down and hover on APIs & Services. On the pop-up menu, click on Enabled APIs & Services.
  5. On the list below, look for YouTube Data API v3. Click on it, then hit Enable API.
  6. Back at your application’s dashboard, look on the left-hand panel and select Credentials.
  7. Click on +CREATE

--

--

Greg L. Turnquist

Sr. Staff Technical Content Engineer at CockroachDB • YouTube Content Creator at https://youtube.com/@ProCoderIO • Best-Selling Author • Coffee Lover