How To Build a YouTube OAuth 2 Client with Spring Boot 3

  Рет қаралды 873

Alex Gutjahr

Alex Gutjahr

Күн бұрын

Hey friends! This is a jam-packed tutorial about using Spring Boot 3, the new RestClient, and the OAuth 2 client to connect to the KZfaq API. We built an application that updates the title of this video to always* reflect the current number of views. The app is even doing this in the background, so we have to extract the access token, which otherwise would only be available during the lifetime of a request!
* well, not always, but every 10 minutes due to KZfaq API restrictions.
🍃 Code & Resources
Grab the code for this tutorial here axgr.dev/posts...
🙌 Get in Touch
Join my newsletter and say hi here axgr.dev/newsl...
🎙 Gear & Links
Mechanical Keyboard: x.axgr.dev/key...
Studio Camera: x.axgr.dev/stu...
Studio Lens: x.axgr.dev/stu...
Studio Mic: x.axgr.dev/stu...
Vlog Camera: x.axgr.dev/vlo...
Vlog Lens: x.axgr.dev/vlo...
All my affiliate links axgr.dev/deals...
I may earn a small commission for purchases made through the links above at no additional cost to you.
🎶 Music
Background music by / @kainbeats
🍿 Subscribe
Want to see more tech tutorials? Subscribe now!

Пікірлер: 9
@user-ib8rv1vr4r
@user-ib8rv1vr4r 6 ай бұрын
3 months later. I need to implement importing files from google drive via oauth2 client in the background for my bachelor's project. And idk how to do this...( Hey I`ve seen that Alex did something with Aouth2 KZfaq API. Oh, this is exactly I needed!
@alexgutjahr
@alexgutjahr 6 ай бұрын
Ha, nice! Hope it all went well!
@user-iu6yz6ck6h
@user-iu6yz6ck6h 10 ай бұрын
thanks for the video! Very useful
@alexgutjahr
@alexgutjahr 10 ай бұрын
Thanks, appreciate the feedback, as always!
@chrispure7461
@chrispure7461 10 ай бұрын
Does the interceptor take care of the expiration of tokens? looks like it tries to get new token for every call. I wish there was some better solution for Oauth2 with new restclient in boot 3.2.
@alexgutjahr
@alexgutjahr 10 ай бұрын
Unfortunately, it doesn't handle it. I've written a few more details here axgr.dev/posts/spring-oauth-client/#offline-access - this way, we can get a refresh token and then generate a new access token when the old one has expired (i.e., when an API call returns a HTTP 401). I've solved this in a dedicated component, which is not in this video, though I might post a follow-up. I'm almost sure Spring reacts to these errors already and can handle refreshing the access token, but I didn't find a quick way to make it work. Thanks for your feedback!
@alexgutjahr
@alexgutjahr 11 ай бұрын
Grab the code here axgr.dev/posts/spring-oauth-client/?
@user-ib8rv1vr4r
@user-ib8rv1vr4r 10 ай бұрын
Hello, Alex! Thanx for a perfect content: video processing, content - everything is amazing. Could you, please, make some more cool videos about OAuth/OIDC? It wolud be cool also if you made a video about X-headers and the way Spring Boot manages them using separate filter. I`m just going to start watching this video, but for now video about link enshorter - is the best idea. Not difficult at all, but very interesting. Thanx! Pretty hope this video will become №1 in my own list of your videos!
@alexgutjahr
@alexgutjahr 10 ай бұрын
Thanks so much for your feedback, I really appreciate it! I have a bunch of videos coming up about security-related topics that also involve accessing headers. If you haven't seen it yet, here is a video I made about MFA based on request headers kzfaq.info/get/bejne/f51in7eTl7WcnKc.html - maybe that already helps!
Spring Boot Security - Users & Roles
15:30
Teddy Smith
Рет қаралды 43 М.
Create a Dynamic Sortable List in Javascript
30:15
Refined Guides
Рет қаралды 288
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 10 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 41 МЛН
How To Add Pagination To A REST Controller With Spring Boot
9:56
How To Send HTML Mails with Brevo and Spring Boot 3
16:12
Alex Gutjahr
Рет қаралды 842
I Never Want To Build Authentication Any Other Way
2:03:20
Elliott Chong
Рет қаралды 18 М.
A First Look at the new Rest Client in Spring Boot 3.2
18:03
Dan Vega
Рет қаралды 27 М.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,7 МЛН
Rate This Invisible Smartphone ⭐
0:11
Shakeuptech
Рет қаралды 581 М.
Samsung Galaxy S24 Ultra Vs Iphone 15 Pro Max
0:56
Roanet Tech
Рет қаралды 6 МЛН
разбил телефон из-за видео
0:15
STANISLAVSKIY Hi
Рет қаралды 989 М.