OAuth2 Login Made Easy in Java: A Spring Boot & Spring Security Walkthrough

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.พ. 2025
  • Are you looking to implement OAuth2 login in your Java application but feeling overwhelmed by the complexity? Look no further! In this video, we'll take a quick dive into the world of OAuth2 authentication using Spring Boot and Spring Security.
    🔗Resources & Links mentioned in this video:
    GitHub Repo: github.com/dan...
    👋🏻Connect with me:
    Website: www.danvega.dev
    Twitter: / therealdanvega
    Github: github.com/dan...
    LinkedIn: / danvega
    Newsletter: www.danvega.de...
    SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️

ความคิดเห็น • 195

  • @geosystems2106
    @geosystems2106 ปีที่แล้ว +9

    This one was great 👍👍 yet 2 possible extensions : 1- Linked the authentication with authorization which is supported by a JWT would be a more real-life example 2- Customization of the login page : Definitely, who wants to use it as it is ?! Thanks a lot !!!! 💙

  • @andyl.5998
    @andyl.5998 ปีที่แล้ว +56

    Definitely would appreciate a tutorial on how to customize the login page with a real front-end framework and tailwind! 🙏

  • @folicreppy5592
    @folicreppy5592 ปีที่แล้ว +19

    Another banger of a tutorial. Thanks for the vid! I'm definitely interested in a tutorial focused on customizing the login page. I'd also be interested in a longer-form React/Angular + Spring Boot + some noSQL DB tutorial if that's a stack you're into! Thanks again!

  • @pawepietrzykowski9893
    @pawepietrzykowski9893 ปีที่แล้ว +9

    Amazing. Tutorial on login with a form mixed with social logins - placed in a separate React or Vue application connected to a spring-boot application acting as authentication and authorization server would be awesome. I could even pay for it :)

  • @CodeJava
    @CodeJava หลายเดือนก่อน

    Glad this wonderful video updated with new version of Spring Security.

  • @poloolo69
    @poloolo69 9 หลายเดือนก่อน +2

    you are the realest one so incredibly concise and high quality tutorials! love your content

  • @sagarbhat3884
    @sagarbhat3884 ปีที่แล้ว +37

    Good video Dan! I would definitely be interested in a tutorial for customizing the login screen in a front end app leveraging React or Vue framework, connected to a Springboot application acting as an OAuth client.

  • @paulnzioki8782
    @paulnzioki8782 ปีที่แล้ว +15

    Hi Dan, thank you for the great tutorials you make for us! 👊 [We] are definitely interested in a tutorial on how to override the default login screen.

  • @saidelhabchi5505
    @saidelhabchi5505 ปีที่แล้ว +2

    Thank you for this tutorial.
    Customizing this with a frontend library is a need tbh

  • @RossieHoorn
    @RossieHoorn ปีที่แล้ว +4

    Great video. I love it when they are short but powerful!

    • @DanVega
      @DanVega  ปีที่แล้ว +1

      Thank you!

    • @sandeep_begudem
      @sandeep_begudem ปีที่แล้ว

      ⁠@@DanVegacould you make tutorial on oauth2 endpoint (no social apps login) so that a user or an entity can access downstream endpoints using the access token? Thank you!

  • @arielcastillo7925
    @arielcastillo7925 ปีที่แล้ว

    thanksss, i think that you are the only making this sort of videos about spring boot jeje, very thanks!!

  • @lovindigital
    @lovindigital 2 หลายเดือนก่อน

    Simple, quality, bset, clear!

  • @SimpleCookiee
    @SimpleCookiee ปีที่แล้ว +5

    Good, now we just need to learn how to logout as well

  • @РоманПивоваров-ф7ш
    @РоманПивоваров-ф7ш 7 หลายเดือนก่อน

    as always, you master to expalin hard things simply ways, thank you a lot!

  • @BbB-vr9uh
    @BbB-vr9uh 4 หลายเดือนก่อน

    Would be curious to learn more about all of this stuff. Great tutorial for an intro!

  • @ger1991mess
    @ger1991mess ปีที่แล้ว

    Awesome! Thank you very much from the bottom of my heart, I am learning Spring and this saved my week.

  • @Apopjak
    @Apopjak ปีที่แล้ว

    What the hell , duude, this is crazy how easy it is thanks for the video

  • @anthonysox2001
    @anthonysox2001 ปีที่แล้ว +2

    Great tutorial. Definitely would love the login page with angular and tailwind.

  • @ornelfranck
    @ornelfranck ปีที่แล้ว

    Niiiiiiiiiiice!!!!And yes customizing the login page would be definitely amazing.

  • @Priya-uz7yy
    @Priya-uz7yy ปีที่แล้ว

    Super cool, always wanted to do it but never knew it was that easy :)

  • @janisyed1519
    @janisyed1519 3 หลายเดือนก่อน +1

    Thank you so much, you made most of my work easy.

    • @DanVega
      @DanVega  3 หลายเดือนก่อน

      You are very welcome. Glad I could help!

  • @mrowox
    @mrowox ปีที่แล้ว

    Thank you so much for this tutorial. I am really looking forward to the tutorial on how to customize the form login. Thank you once again. Cheers

  • @S487x
    @S487x ปีที่แล้ว +4

    It would be great to have a tutorial with customized login and error pages and a real FE connection!

  • @srinivasaraju8399
    @srinivasaraju8399 ปีที่แล้ว

    This is one of the greatest video please keep make spring boot videos

  • @arjunshaji8856
    @arjunshaji8856 ปีที่แล้ว

    Love form KERALA !!! Good video Dan! Thank you.

  • @ncgolfer99
    @ncgolfer99 3 หลายเดือนก่อน

    Excellent Dan!! Thanks!

  • @DanielHorrisberger
    @DanielHorrisberger ปีที่แล้ว

    Yeah I wish a login customization. Great video Dan!

  • @phuocbuinhu
    @phuocbuinhu ปีที่แล้ว

    Thank you so much, that's really help me 'cause spring security is to difficult for me

  • @gordanainic2766
    @gordanainic2766 9 หลายเดือนก่อน

    Hi Dan Vega! Thank you for helping us to understand more about Spring! Can you do one video about Spring and WSO2 API Manager? How it works and how do you use it in Spring! Thank you so much!!!

  • @arnaudpoutieu1331
    @arnaudpoutieu1331 ปีที่แล้ว +1

    Hi Dan. As you asked, please add to this one the customization of login screen (vanilla HTML and CSS). Gratitudes!!!

  • @vaibhavsrivastava4645
    @vaibhavsrivastava4645 ปีที่แล้ว

    A very good content to start with. Thanks Dan.

  • @m_i_g_u_e_l_
    @m_i_g_u_e_l_ ปีที่แล้ว

    Best teacher ever. Thank you so much

  • @mykhailoshekera6079
    @mykhailoshekera6079 3 หลายเดือนก่อน

    Great video, thanks! Tried to set up the OAuth with FB, but figured out they require an app review 🥴

  • @romeritoalencardasilva4032
    @romeritoalencardasilva4032 ปีที่แล้ว

    Tirei o meu o meu chapéu para vc! Parabéns.

  • @gaxgreywarden711
    @gaxgreywarden711 8 หลายเดือนก่อน

    Great tutorial. You saved me a lot of time. Thank you a lot.

  • @victorojo
    @victorojo 7 หลายเดือนก่อน

    Hey @Dan Vega , I will appreciate the video on customizing the login page . Vite or any other framework will be awesome . Thanks for this one

  • @kunalvarpe40
    @kunalvarpe40 ปีที่แล้ว +1

    Yes it would be good know the customizing the pages. Especially with tailwind css.

  • @AlexandreSantos0
    @AlexandreSantos0 5 หลายเดือนก่อน

    Subscribed. You are a great teacher.

  • @Jacker3331
    @Jacker3331 ปีที่แล้ว

    Definately would love to see Spring OAuth in Vue and Tailwind combination!

  • @MichaelRinghusGertz
    @MichaelRinghusGertz 11 หลายเดือนก่อน

    Thanks for a great video. Really explaied how to do this in a quick way. But I would love to see a video of using oauth2, but where the application is a API application, with fx a react frontend. But also i would like to store a user from the oauth2 login, such that the user could be coupled to some sort of data.

  • @naseermohammad3756
    @naseermohammad3756 6 หลายเดือนก่อน

    Incredibly superb

  • @delsix1222
    @delsix1222 ปีที่แล้ว +2

    I really don't understand what am I doing wrong. I have correct client id and client token, the application successfuly redirects to the github oauth2 login (the link is just like in the video), i'm using latest spring boot version, but github says "404 page not found"
    edit: i fixed the issue (in 5 minutes lmao), my client id was incorrect. i had to be more vigilant

  • @attoumak
    @attoumak ปีที่แล้ว +8

    Could you provide the same example but using Spring Authorization Server as provider?

    • @mandelamurithi6417
      @mandelamurithi6417 ปีที่แล้ว

      Yeah, kindly please provide a video for creating an authorization server

  • @prithvirajan105
    @prithvirajan105 4 หลายเดือนก่อน

    You are the best 👍👍

  • @muslehhaj4164
    @muslehhaj4164 7 หลายเดือนก่อน +1

    Amazing simplified long story of OAuth2 login !! I love your way in getting things too simple to understand !!! thanks a lot Master !! 👍👍👌👌👌👌👌👌
    there is another story that I'm trying to find , which is getting OAuth user info and to store it in users DB table. Can you show me how to do it using MVC [not API] ? please Master 🆘🆘

  • @YasithTharindu
    @YasithTharindu 10 หลายเดือนก่อน

    Wow so simple explanation sir thank u

    • @DanVega
      @DanVega  10 หลายเดือนก่อน

      You're most welcome

  • @arnaudpoutieu1331
    @arnaudpoutieu1331 ปีที่แล้ว

    Very informative one. Thanks Dan!

  • @joseantoni034
    @joseantoni034 ปีที่แล้ว

    I would like to watch that tutorial, React, Vue or Angular would be great!

  • @sueprbr
    @sueprbr 10 หลายเดือนก่อน

    Excellent. Nice and simple.

  • @dan2thi
    @dan2thi ปีที่แล้ว

    Awesome stuff! 💯💯💯

  • @user-zs3om7ws9u
    @user-zs3om7ws9u ปีที่แล้ว +2

    Thanks for great video. can u plz make a video with UI framework like React /Angular + Spring security :)

  • @nazariitkachuk9274
    @nazariitkachuk9274 ปีที่แล้ว

    Great explanation!!
    Thanks 😊

  • @deepanshuganotra4088
    @deepanshuganotra4088 ปีที่แล้ว

    Nice concise explanation

  • @akhiladiga9771
    @akhiladiga9771 ปีที่แล้ว +1

    Hello Dan , could you please make a video on Spring Authorization server.

  • @ichigoplayss376
    @ichigoplayss376 ปีที่แล้ว

    I feel like I'm using NextAuth/Authjs with this one, thanks a lot Dan, and also hope there is like another tutorial to save those data to our backend. And how the data is stored to the database after a successful Authentication.

  • @ricardoaguilar8508
    @ricardoaguilar8508 ปีที่แล้ว +1

    It would be great to see frontend part in Vuejs and would be great you can teach us how to do it with a spring authorization server

  • @balajivaradharajan
    @balajivaradharajan 9 วันที่ผ่านมา

    Thanks Dan for the video. I was able to follow and access the API endpoint from the browser, but how to access this endpoint using Postman. I need to be able to hit the endpoint via postman, as that's how i test all of my API endpoints and it is needed especially for POST APIs where i need to pass a payload. Any help will be greatly appreciated.

  • @svalyavasvalyava9867
    @svalyavasvalyava9867 ปีที่แล้ว

    Wonderful tutorial, thank you ☺️

  • @vaibhavchaudhary5423
    @vaibhavchaudhary5423 ปีที่แล้ว

    Informative video. Thank you so much.

  • @TheGuroguro12
    @TheGuroguro12 ปีที่แล้ว +1

    thank you, can same thing be done to custom spring authorization server

  • @mustafakucuk1338
    @mustafakucuk1338 9 หลายเดือนก่อน

    This video is helpfull. Is there a video for social login with angular and spring boot.

  • @kihel-b4e
    @kihel-b4e 6 หลายเดือนก่อน

    Good job !

  • @prasanthvarghese-h2g
    @prasanthvarghese-h2g ปีที่แล้ว

    Great tutorial. Is it possible to open the Oauth2 provider login screen in the new popup and close it upon successful authorization?

  • @batatafeia362
    @batatafeia362 ปีที่แล้ว

    Awesome vid!

  • @Bubumuk
    @Bubumuk ปีที่แล้ว +1

    Nice. I'd like to do it with keycloak

  • @tandapnoelbansikah6280
    @tandapnoelbansikah6280 5 หลายเดือนก่อน

    Great video! Please how can integrate this with my react application, spring boot as backend and react as backend application

  • @bloodxxet
    @bloodxxet ปีที่แล้ว

    very good tutor, keep it up!! also can u please tell which idea theme u use?

  • @kiemtientemu
    @kiemtientemu ปีที่แล้ว +1

    at minute 4:32 what did he click to add on-demand static import

  • @alessandrobx5850
    @alessandrobx5850 ปีที่แล้ว

    Thanks for this video and how to customize the login Page Is very intresting topic

  • @lac4793
    @lac4793 ปีที่แล้ว

    Hi excellent video, could you please said to me what font you currently use for Intellij?, thanks in advance

  • @RaphaelSousa-or1dl
    @RaphaelSousa-or1dl 5 หลายเดือนก่อน +1

    But does the user need to authenticate itself everytime? How can we reuse the token?

  • @mlensment
    @mlensment ปีที่แล้ว

    Thank you for the video! I’m really interested how Oauth2 login would work if I have separate front end in VueJs.

  • @nitisharora2795
    @nitisharora2795 9 หลายเดือนก่อน

    short and crisp!

  • @Acesif
    @Acesif 11 หลายเดือนก่อน +3

    It's an ok-ish tutorial if you already know and understand how spring security works, it just tells you "you do as I do", not really explaining what's going on under the hood

    • @DanVega
      @DanVega  10 หลายเดือนก่อน +1

      What concepts can I explain further?

    • @tomaszstaniewicz7123
      @tomaszstaniewicz7123 3 หลายเดือนก่อน

      @@DanVega maybe how the token/session is stored and recognized on the backend side. Great tutorials anyway!!!

  • @andrestremols6461
    @andrestremols6461 3 หลายเดือนก่อน +1

    Thanks for the vid. I have one question: in oauth2's technical jargon which kind of flow is this?

  • @manassehessanam
    @manassehessanam ปีที่แล้ว

    amazing tutorial

  • @kensaitakeso
    @kensaitakeso ปีที่แล้ว

    Thanks Dan. it would be great to have the same tutorial for MS Azure as well..

  • @jayeshkhadke5516
    @jayeshkhadke5516 ปีที่แล้ว

    Hi Dan, can you also show how to do it using Slack in Spring Boot

  • @harishbabu1920
    @harishbabu1920 ปีที่แล้ว

    Hi, this is very intresting.. can you specify how to achieve this by creating our own customized authorization server and client

  • @tommy--k
    @tommy--k ปีที่แล้ว

    Nice! Thanks!

  • @JavierMarin0802
    @JavierMarin0802 4 หลายเดือนก่อน

    excelente tutorial

  • @sadboi3002
    @sadboi3002 ปีที่แล้ว

    thanks for the video

  • @NurmukhamedaliBegildayev
    @NurmukhamedaliBegildayev 9 หลายเดือนก่อน

    Amazing! Next How to authorize thru it and save this user to Database as customer.

  • @eine_Eule
    @eine_Eule ปีที่แล้ว +1

    Can you create video about classloaders?

  • @chennakesavulu08
    @chennakesavulu08 ปีที่แล้ว +2

    Hi Dan,
    Thanks for doing this video. It's amazing video.
    I tried same with spring boot 2.7.14 and jdk 8
    auth.requestMatchers("/").permitAll(); this line getting error that:Cannot resolve method 'requestMatchers(String)'

  • @HerrKaleu777
    @HerrKaleu777 ปีที่แล้ว +1

    Hi Dan! Thanks for your great videos! I am currently trying to set up a Spring Boot 3.05 REST Api which I want to security using a Keycloak server (which in turn ist hooked up to an LDAP server). I seem to get lost between several changes in Keycloak, Spring security and different tutorials. Any chance you could make a blog post on how to facilitate Keycloak in SB Rest API?

  • @MaseM_youtube
    @MaseM_youtube 2 หลายเดือนก่อน

    Guys whats the deal with the autherization callback url thing? clicking in the documentatin thing only shows info about a "redirect callback url", in fact the word autherization is found nowhere in that documentation page. Help!

  • @abrarsaleem6712
    @abrarsaleem6712 10 หลายเดือนก่อน +1

    hello boss, kindly make a complete project with spring boot backend and vue js forntend with all the functionalities including oauth jwt user roles etc etc

    • @DanVega
      @DanVega  10 หลายเดือนก่อน

      I will add that to my content idea board.

  • @ademyi
    @ademyi ปีที่แล้ว

    great video. thanks

  • @ypathan420
    @ypathan420 ปีที่แล้ว

    would definitely appreciate the custom login page tutorial. I have been looking for it everywhere. I can implement custom login page with the normal form login but i am having issues with oauth2 custom login buttons, where should i direct them etc...

  • @gigglecoder
    @gigglecoder ปีที่แล้ว

    great video Dan. can you make a video that user can login with facebook?

  • @manoharmaddula6700
    @manoharmaddula6700 ปีที่แล้ว

    Thankyou so much!

  •  ปีที่แล้ว

    Great, thank you

  • @hkkabir2024
    @hkkabir2024 ปีที่แล้ว

    it's so easy wow!

  • @datcodingguy
    @datcodingguy 2 หลายเดือนก่อน

    How do you hide the variables here in a .env or am I missing a step. thanks

  • @furkanucar52
    @furkanucar52 ปีที่แล้ว

    Great way to teach sir, but can you make your camera little bit smaller? Can't see easily because of it :(

  • @souravpaul6086
    @souravpaul6086 ปีที่แล้ว

    Great video Dan ❤
    Could you please make a video where we have github login and form login like this video but after successfully login both users (github users and no github users) will get a jwt token to access secured endpoint

  • @RjDBIIPL
    @RjDBIIPL ปีที่แล้ว

    good video&Demonstartion, could you please make video about OKTA authentication via springboot application REST Api

  • @roman_mf
    @roman_mf ปีที่แล้ว

    Love the series, but would really like to see you go a little bit more in depth about this one. After user gives consent is redirected to the redirect URI, what happens? What if users have some persisted preferences in the database and I want to persist the user who authenticated with OAuth2 Login, what would I do?

    • @ozifirebrand
      @ozifirebrand ปีที่แล้ว +1

      Exactly. Currently on this matter

  • @hanisntsolo
    @hanisntsolo ปีที่แล้ว

    Awesome!