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

  Рет қаралды 155,020

Dan Vega

Dan Vega

Күн бұрын

Пікірлер: 189
@geosystems2106
@geosystems2106 Жыл бұрын
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 Жыл бұрын
Definitely would appreciate a tutorial on how to customize the login page with a real front-end framework and tailwind! 🙏
@DanVega
@DanVega Жыл бұрын
Love me some Tailwind!
@jovaniecabatuan6364
@jovaniecabatuan6364 Жыл бұрын
waiting for this tutorial.
@mursalin3698
@mursalin3698 Жыл бұрын
@@DanVega bootstrap is cool too
@nitheeshk1292
@nitheeshk1292 10 ай бұрын
Still waiting!!!
@harisahmad7871
@harisahmad7871 9 ай бұрын
Still waiting!!!
@folicreppy5592
@folicreppy5592 Жыл бұрын
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!
@sagarbhat3884
@sagarbhat3884 Жыл бұрын
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.
@hiteshbulani6079
@hiteshbulani6079 Жыл бұрын
Hey were you able to do that
@michaeladonis2211
@michaeladonis2211 Жыл бұрын
Me too Dan!
@_VuTrungNghia
@_VuTrungNghia Жыл бұрын
yeah 🥰
@paulnzioki8782
@paulnzioki8782 Жыл бұрын
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.
@pawepietrzykowski9893
@pawepietrzykowski9893 Жыл бұрын
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 :)
@BeksultanMamatkadyruulu-e6r
@BeksultanMamatkadyruulu-e6r Жыл бұрын
Yeah I'm also really need it
@saidelhabchi5505
@saidelhabchi5505 Жыл бұрын
Thank you for this tutorial. Customizing this with a frontend library is a need tbh
@S487x
@S487x Жыл бұрын
It would be great to have a tutorial with customized login and error pages and a real FE connection!
@attoumak
@attoumak Жыл бұрын
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
@delsix1222
@delsix1222 10 ай бұрын
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
@arnaudpoutieu1331
@arnaudpoutieu1331 Жыл бұрын
Hi Dan. As you asked, please add to this one the customization of login screen (vanilla HTML and CSS). Gratitudes!!!
@kunalvarpe40
@kunalvarpe40 Жыл бұрын
Yes it would be good know the customizing the pages. Especially with tailwind css.
@SimpleCookiee
@SimpleCookiee 9 ай бұрын
Good, now we just need to learn how to logout as well
@mykhailoshekera6079
@mykhailoshekera6079 27 күн бұрын
Great video, thanks! Tried to set up the OAuth with FB, but figured out they require an app review 🥴
@victorojo
@victorojo 4 ай бұрын
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
@gordanainic2766
@gordanainic2766 7 ай бұрын
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!!!
@andrestremols6461
@andrestremols6461 Ай бұрын
Thanks for the vid. I have one question: in oauth2's technical jargon which kind of flow is this?
@SaurabhSrivastavInBinary
@SaurabhSrivastavInBinary Ай бұрын
Authorization code grant flow
@andrestremols6461
@andrestremols6461 Ай бұрын
@@SaurabhSrivastavInBinary thank you!
@poloolo69
@poloolo69 6 ай бұрын
you are the realest one so incredibly concise and high quality tutorials! love your content
@RossieHoorn
@RossieHoorn Жыл бұрын
Great video. I love it when they are short but powerful!
@DanVega
@DanVega Жыл бұрын
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!
@anthonysox2001
@anthonysox2001 Жыл бұрын
Great tutorial. Definitely would love the login page with angular and tailwind.
@MichaelRinghusGertz
@MichaelRinghusGertz 8 ай бұрын
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.
@BbB-vr9uh
@BbB-vr9uh 2 ай бұрын
Would be curious to learn more about all of this stuff. Great tutorial for an intro!
@muslehhaj4164
@muslehhaj4164 5 ай бұрын
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 🆘🆘
@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
@ricardoaguilar8508
@ricardoaguilar8508 Жыл бұрын
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
@phuocbuinhu
@phuocbuinhu Жыл бұрын
Thank you so much, that's really help me 'cause spring security is to difficult for me
@janisyed1519
@janisyed1519 Ай бұрын
Thank you so much, you made most of my work easy.
@DanVega
@DanVega 29 күн бұрын
You are very welcome. Glad I could help!
@Jacker3331
@Jacker3331 Жыл бұрын
Definately would love to see Spring OAuth in Vue and Tailwind combination!
@akhiladiga9771
@akhiladiga9771 Жыл бұрын
Hello Dan , could you please make a video on Spring Authorization server.
@РоманПивоваров-ф7ш
@РоманПивоваров-ф7ш 4 ай бұрын
as always, you master to expalin hard things simply ways, thank you a lot!
@RaphaelSousa-or1dl
@RaphaelSousa-or1dl 2 ай бұрын
But does the user need to authenticate itself everytime? How can we reuse the token?
@ger1991mess
@ger1991mess Жыл бұрын
Awesome! Thank you very much from the bottom of my heart, I am learning Spring and this saved my week.
@romeritoalencardasilva4032
@romeritoalencardasilva4032 Жыл бұрын
Tirei o meu o meu chapéu para vc! Parabéns.
@tandapnoelbansikah6280
@tandapnoelbansikah6280 2 ай бұрын
Great video! Please how can integrate this with my react application, spring boot as backend and react as backend application
@Apopjak
@Apopjak Жыл бұрын
What the hell , duude, this is crazy how easy it is thanks for the video
@joseantoni034
@joseantoni034 Жыл бұрын
I would like to watch that tutorial, React, Vue or Angular would be great!
@prasanthvarghese-h2g
@prasanthvarghese-h2g 10 ай бұрын
Great tutorial. Is it possible to open the Oauth2 provider login screen in the new popup and close it upon successful authorization?
@m_i_g_u_e_l_
@m_i_g_u_e_l_ Жыл бұрын
Best teacher ever. Thank you so much
@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.
@mlensment
@mlensment Жыл бұрын
Thank you for the video! I’m really interested how Oauth2 login would work if I have separate front end in VueJs.
@DanielHorrisberger
@DanielHorrisberger Жыл бұрын
Yeah I wish a login customization. Great video Dan!
@arielcastillo7925
@arielcastillo7925 Жыл бұрын
thanksss, i think that you are the only making this sort of videos about spring boot jeje, very thanks!!
@Acesif
@Acesif 8 ай бұрын
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 8 ай бұрын
What concepts can I explain further?
@tomaszstaniewicz7123
@tomaszstaniewicz7123 13 күн бұрын
@@DanVega maybe how the token/session is stored and recognized on the backend side. Great tutorials anyway!!!
@AlanHearshel
@AlanHearshel Жыл бұрын
good for an initial insight, but I feel it is kind of incomplete. what if I need to execute a Post? I cant do it from the Browser, right? And if I execute via Postman I wont be viewing the pretty login screen. So I would appreciate a follow-up video to this one so we can learn how to authenticate other types of requests.
@chennakesavulu08
@chennakesavulu08 Жыл бұрын
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)'
@marcoodermatt6857
@marcoodermatt6857 Жыл бұрын
Getting the same error.
@alexm2644
@alexm2644 12 күн бұрын
@DanVega Could you provide a video for version 3.3.5 of OAuth2 authentication server? In the video you are using 3.3.4 for authentication server. Thanks
@DanVega
@DanVega 11 күн бұрын
I probably won't make a video for dot version change. What seems to be the problem?
@user-zs3om7ws9u
@user-zs3om7ws9u Жыл бұрын
Thanks for great video. can u plz make a video with UI framework like React /Angular + Spring security :)
@lac4793
@lac4793 Жыл бұрын
Hi excellent video, could you please said to me what font you currently use for Intellij?, thanks in advance
@HerrKaleu777
@HerrKaleu777 Жыл бұрын
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?
@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...
@alessandrobx5850
@alessandrobx5850 Жыл бұрын
Thanks for this video and how to customize the login Page Is very intresting topic
@arjunshaji8856
@arjunshaji8856 Жыл бұрын
Love form KERALA !!! Good video Dan! Thank you.
@ornelfranck
@ornelfranck Жыл бұрын
Niiiiiiiiiiice!!!!And yes customizing the login page would be definitely amazing.
@benjaminpeljto7408
@benjaminpeljto7408 8 ай бұрын
Hello Dan! I have a question regarding the custom UI login page.. Is it okay just to forward the user to the redirect url from backend and let the backend to the rest? Thanks
@harishbabu1920
@harishbabu1920 Жыл бұрын
Hi, this is very intresting.. can you specify how to achieve this by creating our own customized authorization server and client
@srinivasaraju8399
@srinivasaraju8399 10 ай бұрын
This is one of the greatest video please keep make spring boot videos
@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 Жыл бұрын
Exactly. Currently on this matter
@Priya-uz7yy
@Priya-uz7yy 9 ай бұрын
Super cool, always wanted to do it but never knew it was that easy :)
@TheGuroguro12
@TheGuroguro12 11 ай бұрын
thank you, can same thing be done to custom spring authorization server
@mustafakucuk1338
@mustafakucuk1338 7 ай бұрын
This video is helpfull. Is there a video for social login with angular and spring boot.
@0xfd-xz6ob
@0xfd-xz6ob 7 ай бұрын
Hi Dan, thanks for the video. I got redirected to an error page after authorisation. The error message is {"timestamp":"xxx","status":999,"error":"None"} It doesn't redirect me to localhost:8080/secured?continue. How to fix this?
@0xfd-xz6ob
@0xfd-xz6ob 7 ай бұрын
Also, could you explain why the authorisation callback URL is configured that way? I couldn't find it in the "OAuth documentation".
@TahaSmthnew
@TahaSmthnew 7 ай бұрын
After running my application, no password is provided even though it is required when i try to open localhost:8080
@kensaitakeso
@kensaitakeso Жыл бұрын
Thanks Dan. it would be great to have the same tutorial for MS Azure as well..
@pabloferrando6471
@pabloferrando6471 Жыл бұрын
How would you achieve that with stateless session management? And could you use OAuthClient to facade and hide the provider login screen?
@AndrulisTravel
@AndrulisTravel 8 ай бұрын
Any suggestions regarding this stack auth: Spring Boot with Spring Security and for frontend - Nextjs. Nextjs runs on server and it has part of server side and client side components. I need auth with credentials and Google sign in. From my understanding i need to store jwt inside http only cookie. But what are the strategies for frontend to check the jwt exparationand logout the user?
@gaxgreywarden711
@gaxgreywarden711 5 ай бұрын
Great tutorial. You saved me a lot of time. Thank you a lot.
@punekarinwinnipeg214
@punekarinwinnipeg214 Жыл бұрын
Hello dan, i had a question related to roles and authority in spring security . How can i set authorities directly to the roles. For example : there are two roles ADMIN and ADMIN_TRAINEE. Now only those users with role ADMIN can read and write from/to the database. Whereas users with role ADMIN_TRAINEE can only read from the database. Since these roles are enum fields, how can I add authorities to these enum values? Should I have a separate private instance variable (String) named authorities and store list of authorities? Or is else a way where I can map those enum constants roles to those authorities?
@furkanucar52
@furkanucar52 Жыл бұрын
Great way to teach sir, but can you make your camera little bit smaller? Can't see easily because of it :(
@jayeshkhadke5516
@jayeshkhadke5516 11 ай бұрын
Hi Dan, can you also show how to do it using Slack in Spring Boot
@lucashernancaratozzolo3190
@lucashernancaratozzolo3190 6 ай бұрын
hello I've followed exactly the steps in the video and when I want to log in it shows me "No AuthenticationProvider found for org.springframework.security.authentication.UsernamePasswordAuthenticationToken" do you have any idea why? thanks!
@kiemtientemu
@kiemtientemu Жыл бұрын
at minute 4:32 what did he click to add on-demand static import
@ncgolfer99
@ncgolfer99 14 күн бұрын
Excellent Dan!! Thanks!
@gennadyshevchenko7940
@gennadyshevchenko7940 Жыл бұрын
Can you create video about classloaders?
@NurmukhamedaliBegildayev
@NurmukhamedaliBegildayev 7 ай бұрын
Amazing! Next How to authorize thru it and save this user to Database as customer.
@akshat1808
@akshat1808 Жыл бұрын
Hey Dan, could you please tell me what additional properties I would have to use to implement this for zoom? Thanks.
@Korgoon
@Korgoon Жыл бұрын
I wonder where from did you got that redirect_url, you don't have endpoint like that in your application but everything is working. Why?
@vaibhavsrivastava4645
@vaibhavsrivastava4645 9 ай бұрын
A very good content to start with. Thanks Dan.
@abrarsaleem6712
@abrarsaleem6712 7 ай бұрын
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 7 ай бұрын
I will add that to my content idea board.
@bloodxxet
@bloodxxet Жыл бұрын
very good tutor, keep it up!! also can u please tell which idea theme u use?
@AlexandreSantos0
@AlexandreSantos0 3 ай бұрын
Subscribed. You are a great teacher.
@antikerantrieb2382
@antikerantrieb2382 10 ай бұрын
I Choose Java 21 and have to many problems did something Change since 17 with the 0Auth2??
@naseermohammad3756
@naseermohammad3756 3 ай бұрын
Incredibly superb
@Bubumuk
@Bubumuk Жыл бұрын
Nice. I'd like to do it with keycloak
@Wildlife_foreve
@Wildlife_foreve 5 ай бұрын
why spring security dependency was not used. is oauth acting as a security module here?
@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
@truescopes_1
@truescopes_1 11 ай бұрын
When running the code when first making the two paths in the home controller, I ran into a bug where I didn't get a prompt of the generated password; however I was still prompted a login page. But once I put the annotation of @EnableWebSecurity on the Application file it appeared. Anyone else run into that issue?
@truescopes_1
@truescopes_1 11 ай бұрын
Once I removed @EnableWebSecurity after the first compile. It now appears. I guess the classpath did not contain the websecurity configuration?
@DanVega
@DanVega 11 ай бұрын
Sounds like something strange was going on, but glad to hear it's working for you.
@shaileshsathe9779
@shaileshsathe9779 Жыл бұрын
Hi @Dan, It's very informative ,Can you also create any video of Authorisation Server, Resource Server and Client in the same rest API application using Spring Security, Spring Boot 3, Spring Boot Starter Authorization Server using JWT that way I can also save the resources for different server ?
@AlokKumar-ot9sx
@AlokKumar-ot9sx Жыл бұрын
Hello Dan Thanks for this helpful video. I need a help I need to build an app that has two types of users. One is that needs to go through normal authentication via Spring Security and the other set of users can directly access the app without going through any kind of authentication. (We will differentiate users based on their IP Addresses.) Also I am using Spring Security 6. How to achieve this. Any help and guidance will be appreciated.
@YasithTharindu
@YasithTharindu 8 ай бұрын
Wow so simple explanation sir thank u
@DanVega
@DanVega 7 ай бұрын
You're most welcome
@chuongle3353
@chuongle3353 Жыл бұрын
What intellij theme are you using on the video? Thanks
@gigglecoder
@gigglecoder 9 ай бұрын
great video Dan. can you make a video that user can login with facebook?
@RjDBIIPL
@RjDBIIPL Жыл бұрын
good video&Demonstartion, could you please make video about OKTA authentication via springboot application REST Api
@debkr
@debkr 4 ай бұрын
What is the difference between Oauth2 Login and Oauth2 Client ?
@luizdosreis9610
@luizdosreis9610 Жыл бұрын
Very nice, how this works with an Angular or Vue as Frontend?
@jaysizmir9432
@jaysizmir9432 Жыл бұрын
I believe you just need to use the secured endpoint in his example and set up a custom form login(which can come from Angular, vue or whatever) by providing your login form page url. You can add in the builder of the HttpSecurity object methods like loginPage(), loginProcessingUrl(), failureUrl() and so on...
@m_jdm357
@m_jdm357 Жыл бұрын
It works, but how can we add authorities to these OAuth2 Users?
@deepanshuganotra4088
@deepanshuganotra4088 Жыл бұрын
Nice concise explanation
@arnaudpoutieu1331
@arnaudpoutieu1331 Жыл бұрын
Very informative one. Thanks Dan!
@antonbondar4083
@antonbondar4083 8 ай бұрын
What Idea theme is it? I really need it!!
@DanVega
@DanVega 7 ай бұрын
I have a page for that on my website that I want to add some more tips to www.danvega.dev/ide
@GauravSharma-bl7nu
@GauravSharma-bl7nu 8 ай бұрын
cAN U PLEASE MAKE A VIDEO ONN HOW TO DO IT WITH REACT INTEGRATION (VITE)
@sueprbr
@sueprbr 7 ай бұрын
Excellent. Nice and simple.
When u fight over the armrest
00:41
Adam W
Рет қаралды 31 МЛН
The Singing Challenge #joker #Harriet Quinn
00:35
佐助与鸣人
Рет қаралды 45 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 3,4 МЛН
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 3,5 МЛН
Spring Boot APIs Gateway in 20 Minutes
22:50
The IT Wizard
Рет қаралды 13 М.
OAuth2  & Spring boot 3 & Social login | never been easier
1:05:27
Bouali Ali
Рет қаралды 71 М.
#39 Spring Security | Google and Github Login using OAuth2
15:57
Spring Tips: The Spring Authorization Server
22:21
SpringDeveloper
Рет қаралды 19 М.
Spring Boot + Spring Security + JWT from scratch - Java Brains
39:29
When u fight over the armrest
00:41
Adam W
Рет қаралды 31 МЛН