Closed oshalygin closed 7 years ago
This will never be merged :( @robertdamphousse-okta @robertjd it was good run man!
we should close it
Hi @oshalygin , yes I will close this one, thanks. Internally this library requires cookie-parser, and uses it (see here), so it shouldn't be necessary to add it in? If you've found otherwise I'd love to see the repo.
@robertjd Yeah it's required, I'm kind of tied up right now but I'll put together an example repo :) It's necessary because the cookie needs to be read first from the request and then passed to the SDK middleware. Otherwise, you'll always get unauthenticated if you try to use the middleware
router.use(stormpath.authenticationRequired);
The stormpath middleware, stormpath.authenticationRequired, depends on cookie-parser being defined. Cookie-parser will attach cookies from the request and attach them to the canonical req object in express. This property is then used by the middelware to verify the authenticity of the user and properly secure the route.
This commit provides additional requirements to users who are leveraging the authenticationRequired middleware
Closes #602