Implement SAML strategy in passport-login example
Suggestion
From https://github.com/strongloop/loopback-next/issues/4738#issuecomment-698543534
Implement SAML passport strategy in the passport-login example. cc @pilare
Use Cases
User can login using SAML authentication.
Examples
same ^
Acceptance criteria
- [ ] Add a new login tutorial + example for SAML authentication.
@jannyHou thank you for opening this. I did change the code of passport-saml package and submitted PR there for the bug mentioned by @L-Luciano.
It did help with sending the proper login-request out without modifying loopback-autentication package.
I still have issues on the way back.
By default it’s a POST and it seems that the the response object in the interceptor doesn't have access to SAMLResponse in body, which I can see, on the request that I'm getting in the browser. Without this the passport-saml goes back to to login-request mode. I’m still working on it and will report if I will make progress there.
Right now I'm trying it on as SAML2 stub, which works great with other Node with Express passport-saml examples.
@jannyHou I got working. Problem with the missing body was the body-parser on the express app, that is handling the web application. I've added extended urlencoding and that solved the issue.
app.use(bodyParser.urlencoded({
extended: true
}));
Now I need to incorporate this into my project. I will try to clean up my solution and try to post PR here to expand the example project, or help the others with testing.
@pilare That would be great! Thank you so much on working on it actively 👍 . Looking forward to see your PR, I can help review and land it.
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.
@pilare Could you please share your code regarding this issue - even if it's not clean?
@rizz360 I will sit on this over the weekend, and try to add my implementation to the single sign on example app.
@pilare Thank you for your reply! I'm sorry but I couldn't find where you pushed your implementation