Duration 53:44

Spring Boot OAuth2 Social Login with Google Example

43 848 watched
0
583
Published 28 Sep 2020

Learn how to implement social login using Google for an existing Spring Boot application using Spring Boot OAuth2 client library. And after successful OAuth2 authentication: Register new user if the user's info does not exist in the database, else update existing user's info. Here are the steps to code social login with Google: - Create Google OAuth Credentials - Configure Spring Security OAuth2 Client - Update database table & Entity class (add info about authentication provider) - Update login page - Code Custom OAuth User & OAuth User Service classes - Configure Spring Security for OAuth2 authentication - Implement Authentication Success Handler - Update CustomerServices: register new / update existing user Key technologies: - Spring Boot Web - Spring Data JPA - Spring Security - Spring OAuth2 Client - Thymeleaf - Bootstrap & jQuery - MySQL database Software programs: - Java Development Kit (JDK) - Spring Tool Suite IDE (STS) - MySQL server & MySQL Workbench For the companion tutorial, visit: https://www.codejava.net/frameworks/spring-boot/oauth2-login-with-google-example

Category

Show more

Comments - 144
  • @
    @CodeJava3 years ago Download the sample project in this tutorial: 3
  • @
    @yadav117uday2 years ago This is the most accurate tutorial which did things properly. 1
  • @
    @dmitry14453 years ago Thanks for the tutorial. Hi from belarus) 1
  • @
    @janska0294 years ago Hi, i need help, my error iscannot be cast toi follow the video but in . 1
  • @
    @ai65663 years ago Thank you. This was very informative session.
  • @
    @eugenefeng511last year Thank you for saving me. That' s exact what i want.
  • @
    @hanumantd3 years ago Can you please post database table creation scripts? 1
  • @
    @igorpavlenkov36583 years ago Thanks for this tutorial. Hello from russia)
  • @
    @maral-erdenetumursuh48443 years ago Hello, thank you for great tutorial. I' ve question about security implementation in micro service project. In cloud gateway can not add dependency. So cannot extendhow i do my filter this kind of architechture. ...Expand
  • @
    @xtrange21526 months ago Anh ci login google em ok r nhng c vn l nu em edit user theo kiu gi myuserdetail ra ly ngi dng ang ng nhp hin ti th n s ra login bng pass vs mk bth th ok ko sao ht vn ch thi. Th phn anh lm l a oauth2detail ring ra nn em ngh l 2 thg n ko phn bit c nhau em user role l admin m login bng n ko hin phn ca admin lun kh o. ...Expand
  • @
    @ethandsa19664 years ago Thank you for the tutorial. How do i deny access if the user doesn' t already exist instead of creating a new user?
  • @
    @stevechao40123 years ago Thanks for the great tutorial! I was able to log in using g-mail with my original project!
    and i am able to put g-mail user data in sql server . ...Expand
  • @
    @user-qe2so5vz4t10 months ago Anh i, ti sao trong fle pom ci source code bn di phn miu t a nh km, trong file pom a c nh ny

    e ang dng java 17 th e thay 17 vo th c li bn ra cn nguyn th chy c
    l do l g anh nh? Mong c anh reply
    .
    ...Expand
  • @
    @trinhquycong.20012 years ago This tutorial' s great sir, but how can i implement this into a fullstack application, let say spring boot & angular, since it involves rest api, can you give me some advice? Thank you in advance!
  • @
    @HaiNguyen-qm3ft10 months ago Trong trng hp, login with gg th password trong db l null. Vy chc nng change password dnh cho ti khon lm cch no c th s dng vy anh. Em cm n anh.
  • @
    @charagergi53163 years ago I have a question, oauth2 works with a token for authorization, here i can' t see any function for the token. It is managed automatically or we dont use tokens?
  • @
    @tuananhtran43902 years ago Anh c th lm 1 video vi okta m sso c ko:
  • @
    @roan14352 years ago Hi nam. I followed almost similar to you what you did in this tutorial. But i' m get and errorcannot be empty" do you have any idea why i' m getting this error?
  • @
    @phamluc26613 years ago I' m newbie with spring boot, having a question can i use the oauth2for mobile app?
  • @
    @David-wf3cclast year Where can we get code for front end and other files not included in git. 1
  • @
    @buiucnhan56232 years ago Can you make a video with reactjs as the front end?
  • @
    @ipox00902 years ago Can you tell me where the OAuth2User you wrote is, why can't I see it. Can you help me explain.
  • @
    @rajashekar57554 years ago Nam im doing project can you please help me with this,
    when user enters into my website user should register first and then he needs to be verified by email so that he can login using those crediantials.
  • @
    @tuannguyen-il5oh2 years ago Could you guild to how to force user choose account google to login(when click login with google redirect a page allow choose account google) at video browser get account google we have logined.
  • @
    @user-qe2so5vz4t10 months ago A i lc em download source code v chy th n c bo li l
    connection refused: no further information
    em kim tra li thng tin trong file properties k lm ri m c bo v.
  • @
    @shawaalsaif21443 years ago I have two authentication provider google and facebook. As you set authentication provider to google what if the user logs in with facebook?
  • @
    @charagergi53163 years ago Hi the video was really helpful, but can i find the source code somewhere? Thank you.
  • @
    @VIVEKSINGH-zk4pv4 years ago Hey i am getting error principalities cannot be empty.
  • @
    @arwaalblooshi69444 years ago Can you please do linkedin login? Thanks.
  • @
    @babisvasilopoulos56663 years ago Is any available repository to download the source code.
  • @
    @sanghub16424 years ago Please helps me. I have problem in classwith error: can' t convertto.
  • @
    @vuvankhiem4783 years ago Anh cho em hi l lm sao ly c avatar v c.
  • @
    @rahilbaig38734 years ago Hi, i am getting an error saying " cannot be cast to. 2
  • @
    @masnaswamy40674 years ago Java. Lang. Illegalargumentexception: principalname cannot be empty. How to solve this exception bro.
  • @
    @cuongnguyenminh62353 years ago Anh c chanel bng ting vit ko, em cm n anh.
  • @
    @lokeshdandasena67663 years ago It was nice that u have provided some information but it seems like u are starting from the middle as you have files in the application before even starting . ...Expand
  • @
    @sagarsri41434 years ago Please make video on role based login from scratch.
  • @
    @adamdecarte48472 years ago Hi, my oauth2user does not have. Getatribute( method. Only&getname(
  • @
    @bennteast17762 years ago Can we please have the full source code, the article doesn' t have all the code needed @codejava. 1
  • @
    @nienpingchen49672 years ago How can i get the profile photo from facebook orcan i get a photo from keywordthank you so much for all your springboot tutorial, it help me finish my project, so i can start to find a job!. ...Expand