'How can I store and secure my JWT token in react application

I'm using rest API, If I need to access those API endpoints need to authorize JWT Token. JWT tokens don't have any expiration so I can use anytime same token. Calling API through react application. Can anyone please help me with your idea where I can store JWT Token securely?



Solution 1:[1]

To do it properly, you should use session cookies and not store the tokens in the browser at all.

Instead you should consider using the BFF pattern as described here:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tore Nestenius