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
New to Laravel (not so new to SAML), and was struggling with the Event Listener. This was super helpful, thank you!
@Andrew I am very glad to hear.
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.
Incredible, you helped me a lot!!
Glad I could help!
Can someone help me- can we use same Laravel package for Microsoft ADFS authentication
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?
Same issue happening for me.Login listner not triggering
Hi Alan can you please let me know that after authenticate with Service Provider where exactly your request got redirected ?
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.
It could be your version issue so better to check with package forum
I have a question how to implement FortiAuthenticator SP/Idp with Laravel?
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
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
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?
So once you got the success login from service provider then you can create a token and send it with your url
@@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.
how can i Integrate my website with Google SAML SSO ?
I need help please drop your email I'm getting Saml signature failed ?
kushalsuthar555@gmail.com
I got Assertion token how to use that for my application user login
I am getting response in encrypted. how can I decrypt it?
You have to find some encryption is that and then you can easily decrypt
@@kstechlaravel5426 i tried to find out the encryption but not found from where this encryption is applying
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.
Hi Ankit,
You need to set these params in service provider.
Sorry for late response
Thanks for explaining detail. How can I join multi lines in one line in VS code?
What do you mean multilines in one line?
@@kstechlaravel5426 Sorry to asked not clear question. I pasted the IDP_x509 key to VS code and it not in one line
How do you check login for each page without using user Auth in our app.?
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.
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.
I think you have to check the starting steps of video where I am setting the landing back URL
@@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.
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?
Okay let me check the configuration for okta I will get back to you soon
developer.okta.com/blog/2019/09/05/laravel-authentication can you please check that
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 ?
You can contact me on kushalsuthar555@gmail.com
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??
I think it’s from SAML provider
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?
Are you getting any response in listener?
@@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.
@@ankitsuthar526 have you set the response parameters in Service provider ?
@@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 ?
In oneLogin you need to set the params so can you plz watch the video in starting
Its works with Azure users?
Not sure but may it will work as same way
how to create account onelogin sure?
You need to create account from your company email account
app.onelogin.com/login
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
First of all thanks for your support.
For issue may be your listener not getting call.
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
@imitiaz ahamed
@@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.
@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.
Kindly share your code .
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!
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?
That means you are getting the response on localhost but without port
@@kstechlaravel5426 How could I correct it? When adding the port localhost:8085/saml2/test/acs, the result returned is invalid operation
But why you need port
would this also work with Okta?
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
@@kstechlaravel5426 thank you very much
@@gdtrombetti Thanks for watching. Really it will very helpful for me if you just subscribe to the channel.
@@kstechlaravel5426 Subbed !
did u integrate okta sso via saml2 in laravel?