Skip to content

Commit 3437211

Browse files
authored
Merge pull request azat-co#58 from emirsavran/patch-1
chapter6.md typo fix
2 parents a729278 + cc6e3c3 commit 3437211

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chapter6/chapter6.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Chapter 6
44

55
You know that security is an important aspect of any real-world web application. This is especially true nowadays, because our apps don’t function in silos anymore. What if I tell you that you don't have to spend days studying for security certifications or read sketchy dark-web hacker forums to implement a secure Node app? I'll show you a few tricks.
66

7-
We can makes our apps and communications secure by using various approaches, such as token-based authentication and/or OAuth (<http://oauth.net>). We can leverage numerous third-party services (e.g., Google, Twitter, GitHub) or become service providers ourselves (e.g., provide a public API).
7+
We can make our apps and communications secure by using various approaches, such as token-based authentication and/or OAuth (<http://oauth.net>). We can leverage numerous third-party services (e.g., Google, Twitter, GitHub) or become service providers ourselves (e.g., provide a public API).
88

99
In this practical book, I dedicate the whole chapter to matters of authorization, authentication, OAuth, and best practices. We'll look at the following topics:
1010

@@ -217,7 +217,7 @@ Session-based authentication is done via the `session` object in the request obj
217217
In the main Express.js file, we'll need to import (`require()`) two modules to enable sessions. We need to include and use `cookie-parser` and `express-session`:
218218

219219
1. `express.cookieParser()`: Allows for parsing of the client/request cookies
220-
2. `express.session()`: Exposes the `res.session` object in each request handler, and stores data in the app memory or some other persistent store like MongoDB or Redis
220+
2. `express.session()`: Exposes the `req.session` object in each request handler, and stores data in the app memory or some other persistent store like MongoDB or Redis
221221

222222
Note: in `express-session` version 1.5.0 and higher, there's no need to add the `cookie-parser` middleware. In fact, it might lead to some bad behavior. So it's recommended to use `express-sesison` by itself because it will parse and read cookie by itself.
223223

0 commit comments

Comments
 (0)