I am tasked to develop a system that will allow our users to also log into their accounts and interact with our service using their mobile phones. However, I am concerned about the security of the application.
Basically, we allow users to register through OAuth using Facebook or Twitter. A mobile application (built with an Accelerator type) should do this. After successfully logging in to the phone, I need to notify my application that someone has logged in with FB or Twitter so that my application can receive a user-oriented user ID.
My first thought was to write an API that the phone could call, which would accept parameters like Facebook or twitter userId. I would query my database and find their internal user ID and return it to the phone.
This will work fine, but completely unsafe. Anyone can use the same API with the Facebook user ID, and the API will simply return the internal identifier (and any other data needed by the application) without knowing if the request is allowed.
This is my first mobile application, so I donβt know a bit how to properly implement the security of my API.
security api mobile titanium appcelerator
Bryan migliorisi
source share