However, did you know we can also use them to safely store access tokens?

Access tokens are widely used to authorize users to access restricted resources, such as an API endpoint.

Contrary to this, a web worker is specific to a tab and this allows multiple users to be logged in concurrently.

We can prevent this by passing the allowed URLs to a web worker during the initialization phase.

However, by limiting the third-party libraries used in the web worker to a bare minimum and using only trusted ones, we can largely mitigate these issues.

Related Articles