Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to redirect to SSO provider #3

Open
ThrowsException opened this issue Jun 6, 2014 · 1 comment
Open

How to redirect to SSO provider #3

ThrowsException opened this issue Jun 6, 2014 · 1 comment

Comments

@ThrowsException
Copy link

Hey, your project looks like it may solve getting a current application I have up onto a new SSO provider but I'm a bit confused as to how to use it with Passport. I have my code set up exactly how you have it on your tutorial but I'm not getting redirected to my SSO provider. I see there's a function called ssoInitiator but I'm not sure if the passport/your plugin should be calling that or that's something I need to call myself. Any help would be really appreciated.

@deoxxa
Copy link
Member

deoxxa commented Jun 7, 2014

First off: I haven't touched this module for a while, and actually ended up abandoning it in favour of deoxxa/connect-saml2. That being said, you should be able to get this to work (barring any of the other shortcomings with this module, of which there are many).

You were correct about having to use the ssoInitiator method. You use it to kick off the SSO process and redirect the user to the IDP. Basically you set up a route like app.get("/auth/saml2/initiate", strategy.ssoInitiator.bind(strategy)) and redirect users to it if you want them to be authenticated. Or just call strategy.ssoInitiator(req, res, next) if you want to immediately redirect them to the IDP (without the extra jump in your application).

Anyway. I'd recommend not using this module - it's only up here for reference purposes now. connect-saml2 is much easier to work with, despite moving away from passport. Passport doesn't actually play too nicely with some of the concepts in SAML like full identity transfer, transient identities, persistent anonymous identities, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants