DEV Community

Discussion on: Node.js + Angular 11: JWT Authentication & Authorization example

Collapse
 
anduser96 profile image
Andrei Gatej

Where would that malicious script come from, assuming that the dev has done some research on the libs he/she is using and also that a modern framework is used. I'd say the same caution should be taken in the case of browsers extensions.

The second problem can be mitigated by setting a short expiring date and adding a refresh token, which should last longer.

Collapse
 
tis profile image
Tomasz Struczyński

Supply chain attacks are getting more and more popular. It is not only about your project dependencies, their dependencies dependencies and so on. Even popular libraries can (and are) compromised.

Anyway, among security professionals there is a strong movement to restrict JWT to authentication and not as session tokens.

You may want to look at curity.io/resources/architect/api-... or other articles about JWT (in)security.

Thread Thread
 
anduser96 profile image
Andrei Gatej

Makes sense. Thank you for sharing!