stormpath / express-stormpath

Build simple, secure web applications with Stormpath and Express!
http://docs.stormpath.com/nodejs/express/
Apache License 2.0
325 stars 111 forks source link

Update protected route middleware docs #603

Closed oshalygin closed 7 years ago

oshalygin commented 7 years ago

Closes #602

oshalygin commented 7 years ago

This will never be merged :( @robertdamphousse-okta @robertjd it was good run man!

oshalygin commented 7 years ago

we should close it

robertjd commented 7 years ago

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.

oshalygin commented 7 years ago

@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);