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

Поделиться
HTML-код
  • Опубликовано: 29 дек 2024

Комментарии • 141

  • @TheGhanashyam123
    @TheGhanashyam123 Год назад +2

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

  • @biglittlethings5548
    @biglittlethings5548 Год назад +1

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

  • @nikhilgupta9685
    @nikhilgupta9685 3 года назад +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.

  • @ranjandas7891
    @ranjandas7891 5 лет назад +5

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

  • @RjDBIIPL
    @RjDBIIPL Год назад +2

    awesome content bro

  • @taufiquealam1614
    @taufiquealam1614 5 лет назад +1

    Thanks bro...Simple way of explanation.

  • @quaziist
    @quaziist 6 месяцев назад

    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?

  • @syncmaster793vbe
    @syncmaster793vbe 5 лет назад +1

    Awesome video sr keep posting excellent videos likes this one

  • @siyedyoussef3202
    @siyedyoussef3202 5 лет назад +2

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

  • @rajkumarwinc9372
    @rajkumarwinc9372 9 месяцев назад +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  9 месяцев назад

      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 9 месяцев назад

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

  • @Ravikumar-gj6qw
    @Ravikumar-gj6qw 4 года назад +1

    I'm waiting for this video

  • @dreaobs9062
    @dreaobs9062 2 месяца назад

    So how is it allowing multiple application with one sign in? Should we register each application in okta and get different clinet id and secret ? This videos dosn't contains sufficient info to clarify SSO.

  • @ajaydhiman2368
    @ajaydhiman2368 3 года назад

    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.

  • @niharr7
    @niharr7 Год назад

    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 RUclips.I logged into gmail because i want to check my email but i don't want to login to youtube or map?

  • @sameertiwari1562
    @sameertiwari1562 4 года назад +1

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

    • @Javatechie
      @Javatechie  4 года назад

      Didn't get you active directory ?

  • @rexsam3134
    @rexsam3134 4 года назад

    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

  • @jayasahu3096
    @jayasahu3096 4 месяца назад

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

    • @ye-1723
      @ye-1723 3 месяца назад +1

      those are for configuration only and won't be used explicitly in your code, they're managed automatically by spring boot and okta dependency, for example you tell tomcat to use 9090 as the server port

  • @AnkitLadha-fo8em
    @AnkitLadha-fo8em 6 месяцев назад +1

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

    • @Javatechie
      @Javatechie  6 месяцев назад

      Not sure will check and update you

  • @abhishekpatidar9903
    @abhishekpatidar9903 4 года назад +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  4 года назад

      Then why you are expecting SSO here ?

    • @abhishekpatidar9903
      @abhishekpatidar9903 4 года назад +1

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

    • @Javatechie
      @Javatechie  4 года назад

      Yes each request need to authenticate

    • @Javatechie
      @Javatechie  4 года назад

      If you want to exclude any path then specify antMatchers

  • @amitkumar7566
    @amitkumar7566 4 года назад +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  4 года назад

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

  • @shabri1980
    @shabri1980 3 года назад +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  3 года назад +1

      MFA I am not aware about this let me check

    • @shabri1980
      @shabri1980 3 года назад

      @@Javatechie Thank you awaiting your reply.

  • @kayeshparvez
    @kayeshparvez 4 года назад +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 ?

    • @Javatechie
      @Javatechie  4 года назад +1

      You can go for spring saml api

  • @MustafaKhan-gs2fy
    @MustafaKhan-gs2fy 4 года назад +1

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

    • @shehzab786
      @shehzab786 4 года назад

      any solution for this?

  • @hamdamboyurunov6034
    @hamdamboyurunov6034 4 года назад +1

    You are my friend. Woow nice approach

  • @gattupalli690
    @gattupalli690 4 года назад +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  4 года назад

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

  • @kishorspathak
    @kishorspathak Год назад +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

    • @Javatechie
      @Javatechie  Год назад

      I will try this from backend

  • @MOHITSHARMA-qr7mt
    @MOHITSHARMA-qr7mt 5 лет назад +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  5 лет назад

      Please verify your secret key once

    • @dpraveenk38
      @dpraveenk38 5 лет назад

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

    • @thangletrong970
      @thangletrong970 5 лет назад +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 5 лет назад +1

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

  • @raghalapurushotham3458
    @raghalapurushotham3458 4 года назад +1

    Nice Explanation

  • @subhajitdey868
    @subhajitdey868 4 года назад +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  4 года назад

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

    • @subhajitdey868
      @subhajitdey868 4 года назад

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

    • @Javatechie
      @Javatechie  4 года назад

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

    • @subhajitdey868
      @subhajitdey868 4 года назад +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 3 года назад

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

  • @sssd5632
    @sssd5632 3 года назад

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

  • @AjitSwain-q3o
    @AjitSwain-q3o 4 месяца назад +1

    Can ther be latest video on okta after spring boot 3.xx

    • @Javatechie
      @Javatechie  4 месяца назад

      I haven't tried it in recent time

  • @pujasingh561
    @pujasingh561 3 года назад +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  3 года назад

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

    • @pujasingh561
      @pujasingh561 3 года назад

      @@Javatechie but its not accepting my personal mail id

  • @diegoramos27
    @diegoramos27 2 года назад

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

  • @ranjanasamaranayake1006
    @ranjanasamaranayake1006 3 года назад +1

    Good one.

  • @VivekKumar-pp6cc
    @VivekKumar-pp6cc 3 года назад +1

    Sir can you please explain saml implemention without using okta

  • @gopishettymahindra2713
    @gopishettymahindra2713 Год назад

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

  • @prithvikrishna1164
    @prithvikrishna1164 4 года назад +2

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

    • @Javatechie
      @Javatechie  4 года назад +1

      I tried for single user

    • @prithvikrishna1164
      @prithvikrishna1164 4 года назад +1

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

    • @Javatechie
      @Javatechie  4 года назад

      You can checkout in okta documentation it self

  • @RjDBIIPL
    @RjDBIIPL Год назад

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

  • @anandathakur4937
    @anandathakur4937 4 года назад

    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.

  • @vamshir1943
    @vamshir1943 3 года назад

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

  • @gopishettymahindra2713
    @gopishettymahindra2713 Год назад

    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

  • @raghalapurushotham3458
    @raghalapurushotham3458 4 года назад

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

  • @teluguquoteshub
    @teluguquoteshub 2 года назад

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

  • @hemanthgarlapati2640
    @hemanthgarlapati2640 5 лет назад +1

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

    • @Javatechie
      @Javatechie  5 лет назад +1

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

  • @VivekKumar-pp6cc
    @VivekKumar-pp6cc 3 года назад

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

  • @yc4297
    @yc4297 Год назад

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

  • @vihareddymandala
    @vihareddymandala 4 года назад

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

    • @Javatechie
      @Javatechie  4 года назад

      Yes

    • @vihareddymandala
      @vihareddymandala 4 года назад

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

  • @fdlessard
    @fdlessard 4 года назад +1

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

    • @पापानटोले
      @पापानटोले 4 года назад

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

  • @samanthafox111
    @samanthafox111 7 месяцев назад

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

  • @br4676
    @br4676 5 лет назад +1

    great sir

  • @abhijitprusty
    @abhijitprusty 5 лет назад +1

    superb

  • @kumudhaglory2680
    @kumudhaglory2680 3 года назад

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

  • @farukmomin-u1l
    @farukmomin-u1l Год назад

    Can i do it with Ping Id insted of Okta?

  • @casimirrex
    @casimirrex 4 года назад +1

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

    • @Javatechie
      @Javatechie  4 года назад

      It may be due to the New version 😌

  • @thahermohammed-s2g
    @thahermohammed-s2g Год назад

    how to do this with azure sso

  • @kumarmanish9046
    @kumarmanish9046 4 года назад +1

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

    • @Javatechie
      @Javatechie  4 года назад +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 4 года назад

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

    • @Javatechie
      @Javatechie  4 года назад

      @@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 4 года назад

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

    • @Javatechie
      @Javatechie  4 года назад

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

  • @hemanthgarlapati2640
    @hemanthgarlapati2640 5 лет назад +1

    Expecting spring+keycloak SSO

    • @Javatechie
      @Javatechie  5 лет назад +1

      I need to check hemanth , definitely will update

  • @praveenkumar-rx9sc
    @praveenkumar-rx9sc 3 года назад

    Great video but I got bad credentials can please help thanks

  • @koemdjiev
    @koemdjiev Месяц назад

    How do I log out?

  • @abhishek7969
    @abhishek7969 3 года назад +1

    want to call this endpoint through postman.

    • @Javatechie
      @Javatechie  3 года назад

      Not sure about this need to check

  • @gibranmohammadkhan6216
    @gibranmohammadkhan6216 4 года назад +1

    How to logout??

    • @Javatechie
      @Javatechie  4 года назад

      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 4 года назад +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  4 года назад

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

  • @arunbandari8936
    @arunbandari8936 5 лет назад +1

    How to logout sir...

    • @Javatechie
      @Javatechie  5 лет назад +1

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

    • @arunbandari8936
      @arunbandari8936 5 лет назад

      @@Javatechie thanq for reply...

    • @arunbandari8936
      @arunbandari8936 5 лет назад

      Yes using code

    • @Javatechie
      @Javatechie  5 лет назад

      @@arunbandari8936 let me check

    • @prakharsingh3917
      @prakharsingh3917 4 года назад

      @@Javatechie how to logout using code