samlify
samlify copied to clipboard
createLoginRequest expected to return redirect url string?
I think there is a mistake in the examples that handle the redirect by expecting createLoginRequest to return a url string:
router.get('/spinitsso-redirect', (req, res) => {
res.redirect(sp.createLoginRequest(idp, 'redirect');
});
Is this the right fix:
router.get('/saml/sso-redirect', (req, res) => {
const url = sp.createLoginRequest(idp, 'redirect').context
return res.redirect(url)
})
@tngan i getting error from const url = sp.createLoginRequest(idp, 'redirect').context
ERR_INVALID_ARG_TYPE