Laravel SAML Authentication | SSO | OneLogin | SAML-Laravel Integration

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • KS Tech | Learn your favourite Language No matter you know English or not | Integration of SAML in Laravel.
    Here are some useful links which I used during the session:-
    Laravel SAML Library: github.com/aac...
    SAML Configuration: developers.one...
    #SAML #SSO #LARAVEL-SAML2 #OneLogin

КОМЕНТАРІ • 76

  • @adrintoul
    @adrintoul 3 роки тому +3

    New to Laravel (not so new to SAML), and was struggling with the Event Listener. This was super helpful, thank you!

  • @nyplace1
    @nyplace1 5 місяців тому

    The creator of the library said it was the simplest way to configure it, i disagree i don't think i would be able to get it working without this video explanation and i have been working with SAML for years now.

  • @adam192021
    @adam192021 3 роки тому +1

    Incredible, you helped me a lot!!

  • @BhagatSinghChandrawat
    @BhagatSinghChandrawat Місяць тому

    Can someone help me- can we use same Laravel package for Microsoft ADFS authentication

  • @tanzimislam2395
    @tanzimislam2395 Рік тому +1

    Hi
    Thank you ver much for this video. I followed al the steps, everything works, but just one problem.
    When the asc url is called by the IDP, it does not stay on the acs url and dump data like you showed in the video. Instead it instantly gets redirect to it's root route (localhost:8000/) . any ideas why this is happening?

    • @alanjose7049
      @alanjose7049 Рік тому +2

      Same issue happening for me.Login listner not triggering

    • @kstechlaravel5426
      @kstechlaravel5426  Рік тому

      Hi Alan can you please let me know that after authenticate with Service Provider where exactly your request got redirected ?

  • @VichitraSaini-v6w
    @VichitraSaini-v6w Рік тому

    hiii
    i am getting error when i am installed saml package
    Your requirements could not be resolved to an installable set of packages.
    Installation failed, reverting ./composer.json and ./composer.lock to their original content.

    • @kstechlaravel5426
      @kstechlaravel5426  Рік тому

      It could be your version issue so better to check with package forum

  • @Joeron79
    @Joeron79 2 роки тому

    I have a question how to implement FortiAuthenticator SP/Idp with Laravel?

  • @jesusaranda8595
    @jesusaranda8595 2 роки тому

    Thanks for your content, I have to implement a saml in django, and I was wondering if this tool could help me to test my sp and later change the idp data to the correct server. or else it only works for onelogin

    • @kstechlaravel5426
      @kstechlaravel5426  2 роки тому

      Hi Jesus sorry for being late reply
      Actually it’s only for onelogin but may be it give you the little hints in your path

  • @dipeshchangawala9910
    @dipeshchangawala9910 2 роки тому

    Hello,
    I am using Laravel as Rest API, In the event listener I want to redirect user to the Frontend URL with the authorization token generated into event listener.
    But `redirect(URL?token=mytoken)` not working. How could Frontend store that authorization token?

    • @kstechlaravel5426
      @kstechlaravel5426  2 роки тому

      So once you got the success login from service provider then you can create a token and send it with your url

    • @dipeshchangawala9910
      @dipeshchangawala9910 2 роки тому

      @@kstechlaravel5426 Sorry I Didn't get, My Frontend and Backend URL are different. I used SPA. I use laravel as a backend API. But from the Event listener, I can't use redirection.
      Could you please send me the Code, How can I redirect after getting the authorization token.
      Thank you.

  • @yashvishwakarma6434
    @yashvishwakarma6434 2 роки тому

    how can i Integrate my website with Google SAML SSO ?

  • @GkNarayan-dr8rw
    @GkNarayan-dr8rw 6 місяців тому +1

    I need help please drop your email I'm getting Saml signature failed ?

  • @inbainba8542
    @inbainba8542 3 роки тому

    I got Assertion token how to use that for my application user login

  • @DipeshPatel-d6y
    @DipeshPatel-d6y Рік тому

    I am getting response in encrypted. how can I decrypt it?

    • @kstechlaravel5426
      @kstechlaravel5426  Рік тому

      You have to find some encryption is that and then you can easily decrypt

    • @dipeshpatel2166
      @dipeshpatel2166 Рік тому

      @@kstechlaravel5426 i tried to find out the encryption but not found from where this encryption is applying

  • @ankitsuthar526
    @ankitsuthar526 2 роки тому

    Hello sir
    Finally got the response in Event Listener, now just 1 small issue I get "attributes" element null in the response, as per the video you get your email and name in the "attributes", so what i am needed to do to get that attributes.

    • @kstechlaravel5426
      @kstechlaravel5426  Рік тому

      Hi Ankit,
      You need to set these params in service provider.
      Sorry for late response

  • @maile-cf4wz
    @maile-cf4wz 2 роки тому

    Thanks for explaining detail. How can I join multi lines in one line in VS code?

    • @kstechlaravel5426
      @kstechlaravel5426  2 роки тому

      What do you mean multilines in one line?

    • @maile-cf4wz
      @maile-cf4wz 2 роки тому

      @@kstechlaravel5426 Sorry to asked not clear question. I pasted the IDP_x509 key to VS code and it not in one line

  • @niralshakya3083
    @niralshakya3083 3 роки тому

    How do you check login for each page without using user Auth in our app.?

    • @kstechlaravel5426
      @kstechlaravel5426  3 роки тому

      But Why you don't want to use Auth? and yes you can store something in the session variable and check in your controller actions.

  • @ankitsuthar526
    @ankitsuthar526 2 роки тому

    Hello sir, Your video is very helpfull, I get stuck in the last bit in which we get the Response data in "ACS" Url
    I got a route error and if I change that to my login page it does not go there to the event service provider.
    help If possible.

    • @kstechlaravel5426
      @kstechlaravel5426  2 роки тому

      I think you have to check the starting steps of video where I am setting the landing back URL

    • @ankitsuthar526
      @ankitsuthar526 2 роки тому

      ​@@kstechlaravel5426 sir did i needed to change the URL in "saml2_settings.php" or in "test_idp_settings.php"
      because I have added in "assertionConsumerService" in "test_idp_settings.php " file with my SP login URL.

  • @gdtrombetti
    @gdtrombetti 3 роки тому

    I am back, and got far with the Okta integration. I keep getting a "Signature validation failed. Reference validation failed". I use the IDP SSO metadata x.509 just like you do in the .env. Then I use the SAMLResponse that the IDP sent me to test. Any settings that might be effecting this?

    • @kstechlaravel5426
      @kstechlaravel5426  3 роки тому

      Okay let me check the configuration for okta I will get back to you soon

    • @kstechlaravel5426
      @kstechlaravel5426  3 роки тому

      developer.okta.com/blog/2019/09/05/laravel-authentication can you please check that

  • @lioncat731
    @lioncat731 3 роки тому

    Hi, do you have auth scaffolding installed ? Not sure what's the issue when I tried to do the login step it redirected me automatically to the welcome page (I followed everything is fine until @39:12). I am using laravel 8 as well.
    Do you have email that I can contact you or discord etc ?

  • @immancoc6020
    @immancoc6020 3 роки тому

    Bro I tried. But I got error msg while saml login 'We've been notified about this issue and we'll take a look at it shortly.'. Any solution??

  • @ankitsuthar526
    @ankitsuthar526 2 роки тому

    Hello sir , a litle progress
    in my case I got pass threw the
    "Event::listen('Aacotroneo\Saml2\Events\Saml2LoginEvent', function (Saml2LoginEvent $event) {"
    and request did not going in this.
    where should i check for the error sir?

    • @kstechlaravel5426
      @kstechlaravel5426  2 роки тому

      Are you getting any response in listener?

    • @ankitsuthar526
      @ankitsuthar526 2 роки тому

      @@kstechlaravel5426 no sir but if i do dd($request->all()); i get response but that did not has any Id or attribute in that response.

    • @kstechlaravel5426
      @kstechlaravel5426  2 роки тому

      @@ankitsuthar526 have you set the response parameters in Service provider ?

    • @ankitsuthar526
      @ankitsuthar526 2 роки тому

      @@kstechlaravel5426 i did not know sir where should I set response parameters? is that in any file in saml config or on the One login app configuration ?

    • @kstechlaravel5426
      @kstechlaravel5426  2 роки тому

      In oneLogin you need to set the params so can you plz watch the video in starting

  • @matthausnawan2817
    @matthausnawan2817 2 роки тому

    Its works with Azure users?

  • @heykiiw1371
    @heykiiw1371 3 роки тому

    how to create account onelogin sure?

    • @kstechlaravel5426
      @kstechlaravel5426  3 роки тому

      You need to create account from your company email account
      app.onelogin.com/login

  • @imtiazahamed1632
    @imtiazahamed1632 3 роки тому

    Hello, your tutorial was amazing. I had an issue, when I use dd($userdata) in event listener, it does not show dd in login url but redirect to home directory. can you please tell me what i am doing mistake

    • @kstechlaravel5426
      @kstechlaravel5426  3 роки тому +1

      First of all thanks for your support.
      For issue may be your listener not getting call.

    • @lioncat731
      @lioncat731 3 роки тому

      Hi, have you solved the issue yet ? I have encountered exactly same problem when I try to dd($userdata) when sending login request. So far I can only see 302 found in my header and the request url is mypath/laravel/public/saml2/test/acs. Hope hear from you soon. Thanks

    • @lioncat731
      @lioncat731 3 роки тому

      @imitiaz ahamed

    • @imtiazahamed1632
      @imtiazahamed1632 3 роки тому

      @@lioncat731 sorry for late reply..I was sick..I made a mistake.. my issue was resolved after adding base url to my env file. U can check if your callback url is properly set or not.

    • @yoh9104
      @yoh9104 2 роки тому

      @imitiaz ahamed - I am facing the same issue. What you mean by you gave the base url in the .env file. Can you please elaborate the fix you did. Thanks.

  • @gopikrishna8671
    @gopikrishna8671 6 місяців тому

    Kindly share your code .

  • @animeshkumar2011
    @animeshkumar2011 3 роки тому

    Request URL: localhost:8000/saml2/test/acs
    Request Method: POST
    Status Code: 302 Found
    Remote Address: 127.0.0.1:8000
    Referrer Policy: strict-origin-when-cross-origin
    when i enter url - localhost:8000/saml2/test/login then in networks i am getting not found error as shown above.
    What I am doing wrong? Can you please help me in this? Thank you!

  • @karlosrodas6518
    @karlosrodas6518 Рік тому

    i got this answer: Saml2 error_detail {"error":"The response was received at localhost/saml2/test/acs instead of localhost:8085/saml2/test/acs"} what could be the error?

    • @kstechlaravel5426
      @kstechlaravel5426  Рік тому

      That means you are getting the response on localhost but without port

    • @karlosrodas6518
      @karlosrodas6518 Рік тому

      @@kstechlaravel5426 How could I correct it? When adding the port localhost:8085/saml2/test/acs, the result returned is invalid operation

    • @kstechlaravel5426
      @kstechlaravel5426  Рік тому

      But why you need port

  • @gdtrombetti
    @gdtrombetti 3 роки тому

    would this also work with Okta?

    • @kstechlaravel5426
      @kstechlaravel5426  3 роки тому

      I never tried with other service provider, but I think it will work because in the end we just need to change the configuration that’s it

    • @gdtrombetti
      @gdtrombetti 3 роки тому

      @@kstechlaravel5426 thank you very much

    • @kstechlaravel5426
      @kstechlaravel5426  3 роки тому

      @@gdtrombetti Thanks for watching. Really it will very helpful for me if you just subscribe to the channel.

    • @gdtrombetti
      @gdtrombetti 3 роки тому

      @@kstechlaravel5426 Subbed !

    • @AFZALK-em5lj
      @AFZALK-em5lj 7 місяців тому

      did u integrate okta sso via saml2 in laravel?