views:

33

answers:

2

I'm writing an iPhone app that integrates with third party APIs. These APIs use OAuth (key/secret specific to my app not per user) in order to authenticate which app the request is being made in behalf of.

Is it secure (or how secure) is it to simply put the key/secret in code? Can this sort of data be reverse-engineered? Is there a better way to go about including this data in a project?

A: 

I'd suggest looking into the Keychain services provided by Apple

http://developer.apple.com/library/ios/#documentation/Security/Conceptual/keychainServConcepts/01introduction/introduction.html

Flash84x
This is not a place to hide secrets.
Rook
Completely read over "not per user", yes. Disregard.
Flash84x
Yes, I'm using keychain for other user-specific sensitive data but these are keys specific to the app not the user.
freshfunk
+2  A: 

There is no place on the iPhone to hide data. A user with a jailbroken iPhone has more control over the device than any developer. If possible you should setup a web service such as a REST or SOAP service to take care of these OAuth transactions on behalf of the client.

Rook