https://github.com/survi218/express-cookies-sessions
Using Express cookies and sessions to track authenticated users example
https://github.com/survi218/express-cookies-sessions
cookie-parser cookies express-js express-middleware express-session nodejs nodejs-modules session-cookie session-store sessions
Last synced: 7 months ago
JSON representation
Using Express cookies and sessions to track authenticated users example
- Host: GitHub
- URL: https://github.com/survi218/express-cookies-sessions
- Owner: survi218
- Created: 2017-06-07T02:56:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-07T04:01:01.000Z (over 8 years ago)
- Last Synced: 2025-03-05T21:57:37.220Z (8 months ago)
- Topics: cookie-parser, cookies, express-js, express-middleware, express-session, nodejs, nodejs-modules, session-cookie, session-store, sessions
- Language: JavaScript
- Homepage:
- Size: 2.19 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# express-cookies-sessions
* Using of cookies for authentication. The server will send a signed cookie to the client upon successful authentication, and expects the client to include the cookie with every subsequent request.
- Set up your Express application to send signed cookies.
- Set up your Express application to parse the cookies in the header of the incoming request messages
# Using cookie-parser
- Install the cookie-parser Express middleware in your basic-auth folder by typing the following at the prompt:
````
npm install cookie-parser --save
````
* Using Express sessions to track authenticated users so as to enable authenticated access to server resources.
- Set up your Express server to use Express sessions to track authenticated users
- Enable clients to access secure resources on the server after authentication.
# Installing express-session
- Install express-session and session-file-store Node modules as follows:
````
npm install express-session session-file-store --save
````