This repository has been archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Cookie parser is required for strompath.authenticationRequired #602
Comments
Thanks @oshalygin , we should add this to the docs! |
oshalygin
added a commit
to oshalygin/express-stormpath
that referenced
this issue
Feb 21, 2017
- 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 stormpath#602
oshalygin
added a commit
to oshalygin/express-stormpath
that referenced
this issue
Feb 21, 2017
- 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 stormpath#602
oshalygin
added a commit
to oshalygin/express-stormpath
that referenced
this issue
Feb 21, 2017
- 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 stormpath#602
oshalygin
added a commit
to oshalygin/express-stormpath
that referenced
this issue
Feb 22, 2017
- 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 stormpath#602
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Came across this in my testing earlier but if you protect a route with
stormpath.authenticationRequired
, the authentication check will not occur if the express application didn't bring in thecookie-parser
middleware via the following:Proposing to add this to the
README.md
as a required component right above this section:9. Protect Your Routes
Open to making a PR if you're comfortable with the addition @robertjd
Note: The walkthrough does reference the usage of cookie-parser but it would be good to also include it here in the README.
https://stormpath.com/blog/build-app-nodejs-express-passport-stormpath
The text was updated successfully, but these errors were encountered: