-
Notifications
You must be signed in to change notification settings - Fork 53
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
Deploying without exposing api key? #120
Comments
@MatthewCaseres it's not a sensitive api key in this case, I wouldn't worry about it 👍 It's on the network requests, so it being in javascript isn't a big reveal really |
This is actually dangerous because exposing the API key lets people talk to Giphy as if they were you (including spamming, misusing quota etc). I currently route all requests to giphy through my backend where I can hide the key from the world. |
I was thinking about doing that but wasn't sure how to do that with the SDK without sending the api key to their react component. |
The react components take a fetchGif async function which you can implement to talk to your server instead |
@kwasimensah @MatthewCaseres this is really something you shouldn't be worrying about. Here is the official response to this question from GIPHY:
|
I have heard that API keys should not be passed to the client as they are then available to all visitors of the website. I am not sure how to avoid this because I need to instantiate the giphyFetch on the client side?
The text was updated successfully, but these errors were encountered: