I may be a bit paranoid with the whole process in general, but I want to do the right thing to make sure only legit users can create accounts for our service, and we DO NOT INCLUDE the api secret embedded in our binary which may be 'reverse-engineered'
We want to do one-tap'Sign In With Twitter", and "Sign in With Facebook", and we can use the respective SDK to get the authToken.
For example.:
With Twitter:
As mentioned here https://dev.twitter.com/twitter-kit/ios/twitter-login provides the following information from the SDK,
authTokenproperty
authTokenSecretproperty
userNameproperty
userIDproperty
But I will have to embed the keys in
[[Twitter sharedInstance] startWithConsumerKey:@"your_key"
consumerSecret:@"your_secret"];
We want to verify that this authToken is in fact legit, and our server needs to verify this information. What is the right way to architect this whole process?
With Facebook:
FBSession *session = [[FBSession alloc] initWithAppID:APP_ID permissions:permissions
urlSchemeSuffix:nil tokenCacheStrategy:[[FBSessionTokenCachingStrategy alloc]
initWithUserDefaultTokenInformationKeyName:@"TEST"]];`
If a hacker is able to reverse engineer this APP_ID, or Twitter Keys, how can we verify that this information on our servers to make sure this is infact the legitimate?
What is the best practice for it?