OAuth2 and Google to Protect Your Spring Security and Angular Application

preview_player
Показать описание
In this video I show how to configure a Spring Boot and Angular application to be protected with OAuth2 and Google. I show the Spring Security configuration to setup a resources server and a client server. I also show how to create the Google client in the GCP console.

Chapters:
0:00:00 Introduction
0:02:20 Project creation
00:03:04 Spring Security
00:04:30 Thymeleaf homepage
00:07:11 OAuth2 configuration
00:07:47 Google App Creation
00:10:00 Public Pages
00:15:13 Google API
00:18:12 Custom Introspector
00:25:07 Authentication
00:32:15 Frontend Creation
00:35:19 Frontend read code
00:37:04 Frontend Components
00:41:53 Http Service
00:47:02 Demo

Рекомендации по теме
Комментарии
Автор

This video here saved me! I understand OAuth2 and OpenId Connect but to have it in the Spring Boot way is a lot harder to figure out.
Thank you so much for ythese videos!

dxgamer
Автор

Hi Sergio, This is the ONLY complete example I could find to make a standalone frontend work with spring boot security. Thanks a lot for that. One question - what would be the easiest way to disable security in the development environment so we can develop the back-end without logging in?

yaserarshad
Автор

great content, do you have any video plans about adding a docker deployment for both the frontend and backend?

muadgra
Автор

hi! is the introspection-uri in your source code a placeholder? what should the actual uri be?

Also, how does this integrate with the JWT tutorial that you've done separately? I'm trying to implement both in the same fullstack app but can't seem to interlink the 2!

Thank you so much!!

anikalee
Автор

Could you please make video to demo BFF pattern ( Backend for FrontEnd). BFF is thought more secure than PKCE flow.



Reply

wanggewg
Автор

Thankyou bro very much. I have seen many videos about oauth2. It is the best

bioniccommando
Автор

Hi Sergio, thank you very much. I have a question please: what role does the userDto play in the autherization process since you registered no user ? In fact in my case I want to authenticate with Google my previously registered users Who have name, email, sellerType, address properties in a springboot registration standalone microservice. How can I handle this ? Thank you very much in advance.

Kpiki.abalo
Автор

Excellent video - thanks so much.
How can I get the UserInfo to the client, e.g. if I want to display users name.

MrThomas
Автор

Hi Sergio, I am implementing your code in my application. The access token we get from google expires in 1 hour. Do you know how we can get refresh token and use it for subsequent requests? Thanks in advance

yaserarshad
Автор

Can you create an in depth tutorial about oauth2 and how to customize it along with react?

sanketkalokhe
Автор

Exactly what I was looking for! Thank you!

홍시-yj
Автор

Does this also work when using Facebook for registration instead of Google?

MohamedamineSaassougui
Автор

Thanks for the video, maybe I am a little bit do not understand but can someone explain me why has been changed to What the diff between of them?
I will be happy to see the answer, thanks))

justDimoon
Автор

how did you learn this much brother. Can you tell me which course you referred?

sanketkalokhe
Автор

great tutorial ! but what if i want to add the option : login with registered infos how i can i integrate it

chawebinourelhouda
Автор

how i can do if my app has two options login with user/password has registered in my db and google login ?

huynguyentien
Автор

Hi sergio, can you create a tutorial on how to implement an auth filter for your application, how you validate the access token, and lastly how to combine local login and oauth login even with auth filter implementation, thanks

iamdavidtega
Автор

This is a great tutorial. Thank you ✌👌

HamedNaderi-qk
Автор

Thanks for the video
I would like to implement it in a personal project I have this error please help me
NG04002: Cannot match any routes. URL Segment: '%5Bobject%20Object%5D'

efoamegnito
Автор

hey brother can you make a complete tutorial on spring boot microservices with security that will work with angular as frontend

mdasadalihaidar