samlify icon indicating copy to clipboard operation
samlify copied to clipboard

createLoginRequest expected to return redirect url string?

Open hammadzz opened this issue 9 years ago • 2 comments

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)
})

hammadzz avatar Sep 07 '17 19:09 hammadzz

@hammadzz Yes, the document seems not updated.

The API changes since this commit for the issue #50.

tngan avatar Sep 08 '17 00:09 tngan

@tngan i getting error from const url = sp.createLoginRequest(idp, 'redirect').context

ERR_INVALID_ARG_TYPE

Dhinendran avatar Sep 09 '20 11:09 Dhinendran