Chart access tokens are “keys” to sensitive information.
You should treat access tokens with the same level of security as you would passwords.
Secure storage best practices
Storing tokens securely should be done on the backend (server-side) of your application, not on the frontend (client-side). A frontend application is more susceptible to potential security threats such as Cross-Site Scripting (XSS) attacks or unauthorized access if the client is compromised. Therefore, Chart requires developers to store tokens securely on the backend server where you have better control over access and security. No application is 100% secure, but there are ways to reduce the potential of an exposure (and its impact) by following a few best practices:- Store tokens on the backend of your application.
- Encrypt the access token before storing it.
- Use environment variables or a secure configuration management system to store static sensitive information that needs to be referenced like
client_secret
. - Never store access tokens in code files or easily accessible directories with human access.
- Ensure that tokens are not exposed in URLs, logs, or error messages.
- Keep all server-side components, libraries, and frameworks up-to-date with security patches to mitigate potential vulnerabilities.