Skip to content

Commit

Permalink
Update part4d.md
Browse files Browse the repository at this point in the history
This pull request will improve the overall flow of the text, making it sound more natural, as well as correcting the following:

comparative adjective form:
more safe => safer

idiomatic expression: 
if the token gets into the wrong hands => If the token falls into the wrong hands 

choice of connector:
on the other hand => however

verb form: 
to login => to log in
  • Loading branch information
kevmhughes authored Dec 15, 2024
1 parent 29c352a commit 2543383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/4/en/part4d.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ const errorHandler = (error, request, response, next) => {
}
```

The shorter the expiration time, the more safe the solution is. So if the token gets into the wrong hands or user access to the system needs to be revoked, the token is only usable for a limited amount of time. On the other hand, a short expiration time forces a potential pain to a user, one must login to the system more frequently.
The shorter the expiration time, the safer the solution is. If the token falls into the wrong hands or user access to the system needs to be revoked, the token is only usable for a limited amount of time. However, a short expiration time is a potential pain point for the user, as it requires them to log in more frequently.

The other solution is to save info about each token to the backend database and to check for each API request if the access rights corresponding to the tokens are still valid. With this scheme, access rights can be revoked at any time. This kind of solution is often called a <i>server-side session</i>.

Expand Down

0 comments on commit 2543383

Please sign in to comment.