Video není dostupné.
Omlouváme se.

Single Sign-On with Spring Boot & Okta | OAuth 2.0 | Java Techie

Sdílet
Vložit
  • čas přidán 20. 07. 2019
  • This video explain you How to Add Single Sign-On to Your Spring Boot Web Application using okta & OAuth 2.0
    #javatechie #SpringBoot #Security #Okta_SSO #OAuth 2.0
    GitHub:
    github.com/Java-Techie-jt/spr...
    Blogs:
    javagyanmantra.wixsite.com/we...
    Facebook:
    / 919464521471923
    Music: City_of_Jewels
    guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
    Disclaimer/Policy:
    --------------------------------
    Note : All uploaded content in this channel is mine and its not copied from any community , you are free to use source code from above mentioned GitHub account

Komentáře • 136

  • @TheGhanashyam123
    @TheGhanashyam123 Před rokem +2

    Great post. I was looking for a simple application and I got it ❤

  • @taufiquealam1614
    @taufiquealam1614 Před 5 lety +1

    Thanks bro...Simple way of explanation.

  • @ranjandas7891
    @ranjandas7891 Před 5 lety +5

    Super Sir...Sir please upload small spring boot project with all implementation likw spring security,thymeleaf,etc

  • @syncmaster793vbe
    @syncmaster793vbe Před 4 lety +1

    Awesome video sr keep posting excellent videos likes this one

  • @siyedyoussef3202
    @siyedyoussef3202 Před 5 lety +2

    Great video Sir 👍 we would love to see Spring+keyclock

  • @biglittlethings5548
    @biglittlethings5548 Před 10 měsíci +1

    Thank you so much for this valuable tutorial..you are awesome 👏👏👏

  • @Ravikumar-gj6qw
    @Ravikumar-gj6qw Před 4 lety +1

    I'm waiting for this video

  • @raghalapurushotham3458
    @raghalapurushotham3458 Před 4 lety +1

    Nice Explanation

  • @user-lw2jn8gp3e
    @user-lw2jn8gp3e Před 11 měsíci +2

    awesome content bro

  • @br4676
    @br4676 Před 5 lety +1

    great sir

  • @ranjanasamaranayake1006
    @ranjanasamaranayake1006 Před 3 lety +1

    Good one.

  • @abhijitprusty
    @abhijitprusty Před 4 lety +1

    superb

  • @nikhilgupta9685
    @nikhilgupta9685 Před 3 lety +5

    Thanks for the video. Just an update, as of to-date, the application type needs to be selected as OAuth Service to get Client ID & Secret. Selecting type as Web with SWA or SAML or OpenID wouldn't give you client ID/Secret.

  • @sameertiwari1562
    @sameertiwari1562 Před 4 lety +1

    Thank you Sir for explaining this
    how we can integrate active directory in okta

    • @Javatechie
      @Javatechie  Před 4 lety

      Didn't get you active directory ?

  • @ajaydhiman2368
    @ajaydhiman2368 Před 3 lety

    My query - here you are using Okta server for authentication but in real time project where there is no Okta OR any other system then do we need to build it own first before implementing SSO ? I mean what happens in real time project basically. Which items/components will be provided by client OR what we should ask from client. can you please put some light on these basic queries.

  • @raghalapurushotham3458

    Hi Sir, Do we have a provision to disable or enable SSO?

  • @hamdamboyurunov6034
    @hamdamboyurunov6034 Před 4 lety +1

    You are my friend. Woow nice approach

  • @kishorspathak
    @kishorspathak Před rokem +1

    Really love the range of topics you cover. May i request you for a video using SpringSecurity with SAML2 and PingFederate. The call shall originate from ReactJs app and ilredirected to pingFederate via Spring Security. I need to use Java 8

  • @quaziist
    @quaziist Před měsícem

    Hi Basant sir, in this implantation what method of SSO is basically used, is it SAML? or OpenIDConnect? how do we know?
    have you had more detailed video on this topic?

  • @rexsam3134
    @rexsam3134 Před 3 lety

    Latest version of Spring Boot is 2.4.1 and video is on 2.1.4.
    Any reason why it doesnt work on latest version of Boot and Okta?
    Your video is just 1 year old.
    Okta url for new app too has changed

  • @sssd5632
    @sssd5632 Před 3 lety

    I am getting SSLHandshakeException, PKIX path building failed while running the program, please help

  • @diegoramos27
    @diegoramos27 Před 2 lety

    Hi sir I don't have the "Cloud OAuth2" starter, how can I find it ? Thanks

  • @rajkumarwinc9372
    @rajkumarwinc9372 Před 4 měsíci +1

    Thanks Basant for great knowledge.
    SSO basically works for different applications access without asking login so in this video multiple applications are not there, and you have created only one application and triggered the same endpoint multiple times, bit confusing...

    • @Javatechie
      @Javatechie  Před 4 měsíci

      The moral here is to delegate the auth request to a 3rd party provider so for demo purposes I have created a single app but you can create multiple apps and test it.

    • @rajkumarwinc9372
      @rajkumarwinc9372 Před 4 měsíci

      @@Javatechie so we need to add new app in okta, okay I'll try

  • @kayeshparvez
    @kayeshparvez Před 3 lety +1

    Thanks for the nice demonstration. What should I do if I want to remove the dependency of okta and the whole SSO to be controlled by my own app ?

  • @anandathakur4937
    @anandathakur4937 Před 4 lety

    How to get the access token here.. If I have more API and I want to test them from postman how can I get the access token.

  • @teluguquoteshub
    @teluguquoteshub Před rokem

    Please make a video on Spring Security with SAML SSO example.

  • @niharr7
    @niharr7 Před 10 měsíci

    But the requirement can be opposite.Why would you login the user to youtube? It should happen only when I click on login button on CZcams.I logged into gmail because i want to check my email but i don't want to login to youtube or map?

  • @gopishettymahindra2713
    @gopishettymahindra2713 Před 11 měsíci

    Great explnation sir. Can you please let me know sir how to test this in postman

  • @jayasahu3096
    @jayasahu3096 Před 23 hodinami

    The values you have stated in application.property file about okta server ....where have they been used in application ?

  • @VivekKumar-pp6cc
    @VivekKumar-pp6cc Před 3 lety

    Sir please explain about saml sp initated sso and use pure saml only without third party api i am facing issue in that

  • @VivekKumar-pp6cc
    @VivekKumar-pp6cc Před 3 lety +1

    Sir can you please explain saml implemention without using okta

  • @MustafaKhan-gs2fy
    @MustafaKhan-gs2fy Před 4 lety +1

    On implementing this getting below exception
    org.springframework.security.oauth2.client.resource.UserRedirectRequiredException
    Can you please let me know what I am missing?

  • @prithvikrishna1164
    @prithvikrishna1164 Před 4 lety +2

    Good video sir @javatechie do you have video for several user login in for application

    • @Javatechie
      @Javatechie  Před 4 lety +1

      I tried for single user

    • @prithvikrishna1164
      @prithvikrishna1164 Před 4 lety +1

      @@Javatechie can you suggest any idea for several user or any referrence

    • @Javatechie
      @Javatechie  Před 4 lety

      You can checkout in okta documentation it self

  • @shabri1980
    @shabri1980 Před 3 lety +1

    Nice Explanation.
    My requirement is below
    1. Enable okta MFA for certain users.
    2. Can we switch to okta MFA conditionally based on a flag check from Principal
    3. If we dont have spring boot but just spring how can this be done.
    Thank you

    • @Javatechie
      @Javatechie  Před 3 lety +1

      MFA I am not aware about this let me check

    • @shabri1980
      @shabri1980 Před 3 lety

      @@Javatechie Thank you awaiting your reply.

  • @user-lw2jn8gp3e
    @user-lw2jn8gp3e Před 11 měsíci

    i cant able to login to okta console through rest end point showing unable to sign in ,please reply

  • @yc4297
    @yc4297 Před 7 měsíci

    How it will work for multiple user logins with different username and password

  • @vamshir1943
    @vamshir1943 Před 3 lety

    Can you show me how to done sso for j2ee applications (servlets ans jsp ) with okta saml authentication.....

  • @gattupalli690
    @gattupalli690 Před 3 lety +1

    Sir I am getting this error org.springframework.security.oauth2.client.resource.UserRedirectRequiredException: A redirect is required to get the users approval can you help me?

    • @Javatechie
      @Javatechie  Před 3 lety

      Sowmya can you import my code and only change your secret key info

  • @gopishettymahindra2713
    @gopishettymahindra2713 Před 10 měsíci

    Hi Sir , Can you please show or reply to me how to generate this token when third party is accessing my api , how they will pass user and password information in the header or how they will pass this token

  • @user-yg8it7tw2n
    @user-yg8it7tw2n Před rokem

    Can i do it with Ping Id insted of Okta?

  • @kumudhaglory2680
    @kumudhaglory2680 Před 3 lety

    Can you please implement oauth2 grant types in spring cloud api gateway

  • @abhishekpatidar9903
    @abhishekpatidar9903 Před 3 lety +1

    i have three microservices and for front ent i have angular application, then i want to login with my own database by using jwt, then how i can use single sign own feature, that is when user gets once logged in then it can access all the three microservices api by using that jwt token.

    • @Javatechie
      @Javatechie  Před 3 lety

      Then why you are expecting SSO here ?

    • @abhishekpatidar9903
      @abhishekpatidar9903 Před 3 lety +1

      @@Javatechie then i need to authenticate for every microservices or is there any way, please suggest?

    • @Javatechie
      @Javatechie  Před 3 lety

      Yes each request need to authenticate

    • @Javatechie
      @Javatechie  Před 3 lety

      If you want to exclude any path then specify antMatchers

  • @amitkumar7566
    @amitkumar7566 Před 3 lety +1

    It's not working and throwing error.. I am using springboot 2.3.8 and okta 0.6.0...can you make an updated tutorial on it...or just help with the new updated

    • @Javatechie
      @Javatechie  Před 3 lety

      Amit check in okta official side , you can raise an incident their for version conflict

  • @MOHITSHARMA-qr7mt
    @MOHITSHARMA-qr7mt Před 4 lety +1

    Hi @javatechie, I am getting this issue "org.springframework.security.oauth2.client.resource.UserRedirectRequiredException: A redirect is required to get the users approval", I have clear the cookies and cache but the issue still persist. Please help me on this.

    • @Javatechie
      @Javatechie  Před 4 lety

      Please verify your secret key once

    • @dpraveenk38
      @dpraveenk38 Před 4 lety

      I'm facing the same issue. I have a feeling it might be due to versioning problems. I'm using Java 11

    • @thangletrong970
      @thangletrong970 Před 4 lety +1

      Hi #MOHIT SHARMA
      You try download source of Java Techie "github.com/Java-Techie-jt/spring-boot-okta-sso" and replace "okta.oauth2.issuer" , "okta.oauth2.clientId" , "clientSecret" for you on okta, and run try again.I have tested and succeeded!
      good luck for you!

    • @samirnai9321
      @samirnai9321 Před 4 lety +1

      Worked for me after replacing okta.oauth2.client-id to okta.oauth2.clientId
      and okta.oauth2.client-secret to okta.oauth2.clientSecret

  • @hemanthgarlapati2640
    @hemanthgarlapati2640 Před 5 lety +1

    What if other users want to sign in to our application, how to configure it for multiple user login???

    • @Javatechie
      @Javatechie  Před 5 lety +1

      There is a option in okta console to create a group and we can assign user who can access your application .

  • @AnkitLadha-fo8em
    @AnkitLadha-fo8em Před měsícem +1

    Okta dependency is not available in spring boot 3.3.0. What’s the alternative

    • @Javatechie
      @Javatechie  Před měsícem

      Not sure will check and update you

  • @user-yc2ho5oh7b
    @user-yc2ho5oh7b Před 10 měsíci

    how to do this with azure sso

  • @subhajitdey868
    @subhajitdey868 Před 4 lety +1

    Hi, I tried to follow all the steps as shown in the tutorial. However, in my case I'm getting multiple redirect error when I try get to localhost:9090 page...can you please help?

    • @Javatechie
      @Javatechie  Před 4 lety

      Did you configure localhost:9090 as redirect URL while configure in okta

    • @subhajitdey868
      @subhajitdey868 Před 4 lety

      @@Javatechie I configured localhost:9090/login as redirect URI in OKTA

    • @Javatechie
      @Javatechie  Před 4 lety

      @@subhajitdey868 can you share error message with screenshot to javatechie4u@gmail.com

    • @subhajitdey868
      @subhajitdey868 Před 4 lety +1

      @@Javatechie solved the issue, it was with application.properties file...it should be clientid not client-id and clientsecret not client-secret

    • @roxyhossen634
      @roxyhossen634 Před 3 lety

      @@Javatechie yes i did but i got same error ........ can you help?

  • @fdlessard
    @fdlessard Před 4 lety +1

    Stoped working for okta-spring-boot-starter > 0.6.1

    • @user-cq7db9ij1o
      @user-cq7db9ij1o Před 4 lety

      true.
      i am getting below error-
      Description: The 'redirect_uri' parameter must be an absolute URI that is whitelisted in the client app settings.

  • @vihareddymandala
    @vihareddymandala Před 3 lety

    DO we have different client-Id and client-secret for each Okta user?

    • @Javatechie
      @Javatechie  Před 3 lety

      Yes

    • @vihareddymandala
      @vihareddymandala Před 3 lety

      @@Javatechie In that case do we need to add all those values in the spring property file? How to manage them?

  • @praveenkumar-rx9sc
    @praveenkumar-rx9sc Před 2 lety

    Great video but I got bad credentials can please help thanks

  • @pujasingh561
    @pujasingh561 Před 2 lety +1

    while creating okta account its asked me the business mail only So I created with my company mail id ,now I have fear like will it charge money after 30 days, please help me on this and if it will charge how to delete account

    • @Javatechie
      @Javatechie  Před 2 lety

      No they won't charge don't worry . And it's not good practice to create trial account with company mail id

    • @pujasingh561
      @pujasingh561 Před 2 lety

      @@Javatechie but its not accepting my personal mail id

  • @hemanthgarlapati2640
    @hemanthgarlapati2640 Před 5 lety +1

    Expecting spring+keycloak SSO

    • @Javatechie
      @Javatechie  Před 5 lety +1

      I need to check hemanth , definitely will update

  • @samanthafox111
    @samanthafox111 Před 2 měsíci

    Okta is 30 days evaluation and now needs company credentials with lot of approval emails

  • @casimirrex
    @casimirrex Před 3 lety +1

    okta.oauth2.clientId
    okta.oauth2.clientSecret ,need to change like this. it will work

    • @Javatechie
      @Javatechie  Před 3 lety

      It may be due to the New version 😌

  • @abhishek7969
    @abhishek7969 Před 3 lety +1

    want to call this endpoint through postman.

    • @Javatechie
      @Javatechie  Před 3 lety

      Not sure about this need to check

  • @gibranmohammadkhan6216
    @gibranmohammadkhan6216 Před 4 lety +1

    How to logout??

    • @Javatechie
      @Javatechie  Před 4 lety

      You can create a config class extends it from WebSecurityConfigureAdapter then specify your logout URL .
      Also you can check in okta config there should have some option to configure logout URL

    • @gibranmohammadkhan6216
      @gibranmohammadkhan6216 Před 4 lety +1

      @@Javatechie I have followed the same steps and I am getting
      "org.springframework.security.oauth2.client.resource.UserRedirectRequiredException"A redirect is required to get the users approval"

    • @Javatechie
      @Javatechie  Před 4 lety

      Check is there any firewall restriction on your machine if yes please disable it

  • @kumarmanish9046
    @kumarmanish9046 Před 4 lety +1

    You are just typing but not explaining. Example, what is the use of the annotation @EnableOAuth2Sso ?

    • @Javatechie
      @Javatechie  Před 4 lety +1

      Simply this annotation will enable oauth specific default config in code . That's the reason when you kick start your application it directly redirect to SSO login page .

    • @kumarmanish9046
      @kumarmanish9046 Před 4 lety

      @@Javatechie Thank you. And what is the use of http.csrf.disable() ?

    • @Javatechie
      @Javatechie  Před 4 lety

      @@kumarmanish9046 please go through below tutorial to understand why csrf with realtime example www.javainuse.com/spring/boot_security_csrf#:~:text=But%20till%20now%20in%20all,which%20they%20are%20currently%20authenticated.

    • @kumarmanish9046
      @kumarmanish9046 Před 4 lety

      @@Javatechie Thanks for replying! I understand the CSRF concepts but for this tutorial specifically, what is the use of disabling csrf?

    • @Javatechie
      @Javatechie  Před 4 lety

      @@kumarmanish9046 usually we disable it in real-time to avoid malicious attack
      Eventhough it is one Hello world application 🙂

  • @arunbandari8936
    @arunbandari8936 Před 4 lety +1

    How to logout sir...

    • @Javatechie
      @Javatechie  Před 4 lety +1

      Using code you are asking ?
      Once you stop your server automatically you will logged out from okta server .

    • @arunbandari8936
      @arunbandari8936 Před 4 lety

      @@Javatechie thanq for reply...

    • @arunbandari8936
      @arunbandari8936 Před 4 lety

      Yes using code

    • @Javatechie
      @Javatechie  Před 4 lety

      @@arunbandari8936 let me check

    • @prakharsingh3917
      @prakharsingh3917 Před 4 lety

      @@Javatechie how to logout using code