Monday, June 3, 2024
169
rated 0 times [  171] [ 2]  / answers: 1 / hits: 20414  / 13 Years ago, fri, october 21, 2011, 12:00:00

For example, check out this Facebook plugin.



In the client side the API key is clearly visible. What is stopping another user from obtaining this key and using this feature on a different site?



I figured a very naive implementation would be to check the domain the request comes from but things like this are easy to fake.



If I were to create something similar, how would I go about securing the authentication process?



I want as much of this work to be client side, though some form of server authentication will be required surely? Any links or advice would be greatly appreciated.



Update



Similar question about API keys that I found useful.


More From » authentication

 Answers
3

In three words: server-side validation. FB itself will throw an error when you use a key that's incorrect for the given site. The API key is not supposed to be secret (as opposed to the secret key).


[#89503] Wednesday, October 19, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
josefinap

Total Points: 548
Total Questions: 125
Total Answers: 106

Location: Angola
Member since Tue, May 5, 2020
4 Years ago
;