Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API keys are exposed on the client side #133

Open
fvoordeckers opened this issue Nov 1, 2024 · 0 comments
Open

API keys are exposed on the client side #133

fvoordeckers opened this issue Nov 1, 2024 · 0 comments

Comments

@fvoordeckers
Copy link

⚠️ Security risk

The hooks to fetch te data call the services directly from the frontend.
This exposes the API key to the user. Since there are rate limits and pricing models linked to the amount of calls, it would be easy to abuse API keys.

How to reproduce

  1. Setup a project
  2. Load the webpage and inspect the network
  3. The API key will be exposed to any visitor

How to solve

The frontend should not be aware of the API endpoint and should go through it's own API to fetch the data.
The hooks should only handle the API you manage yourself and the data it provides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant