Skip to content

Commit b546d37

Browse files
committed
Add brief mention of browser storage options for JWTs
1 parent 10a0cd0 commit b546d37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nodeJS/authentication/json_web_tokens.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ if (user?.password === req.body.password) {
5353
}
5454
```
5555
56-
<span id="sending-jwts">There are many ways JWTs can be sent to and from servers, such as in the response's "Authorization" header via the [Bearer scheme](https://security.stackexchange.com/questions/108662) or via httpOnly cookies. Since we have not yet covered how to handle cross-site cookies, the example above sends the JWT as a bearer token in the response's Authorization header.</span>
56+
<span id="sending-jwts">There are many ways JWTs can be sent to and from servers, such as in the response's "Authorization" header via the [Bearer scheme](https://security.stackexchange.com/questions/108662) or via httpOnly cookies. Since we have not yet covered how to handle cookies when the client and server are deployed on different domains, the example above sends the JWT as a bearer token in the response's Authorization header. When received, the client can store the JWT in a number of ways, such as in the same httpOnly cookie it came in, as well as extracting the token from the Authorization header then storing it in localStorage.</span>
5757
5858
<div class="lesson-note lesson-note--critical" markdown="1">
5959
@@ -107,7 +107,7 @@ The following questions are an opportunity to reflect on key topics in this less
107107
- [How does stateless authentication differ from stateful authentication?](#introduction)
108108
- [What is a JSON web token?](#jwts)
109109
- [How does a JWT protect against tampering?](#jwt-signature)
110-
- [What are some ways that JWTs can be sent between client and server?](#sending-jwts)
110+
- [What are some ways that JWTs can be sent and stored between client and server?](#sending-jwts)
111111
112112
### Additional resources
113113

0 commit comments

Comments
 (0)