-
Notifications
You must be signed in to change notification settings - Fork 487
Description
Step 1: The problem
According to the iOS Twitter login documentation, there is no requirement to store the consumer key secret in the app: https://firebase.google.com/docs/auth/ios/twitter-login (btw, the setup step to "Add twitterkit-TWITTER_CONSUMER_KEY as a URL scheme in your Xcode project" is absent in that link).
In the ReadMe for this repo, it warns "please note that's it's not secure to store the consumerSecret in the app itself", yet gives instructions on how to put the secret into the info.plist file:
Update Info.plist with Twitter and Tacebook configuration values
Fabric -> Kits -> KitInfo -> consumerKey / consumerSecret (put Twitter App consumer key/secret).
(Bonus hint on the spelling)
To boot, these instructions are outdated since one assigns the twitter key and secret in the FUIAppDelegate.m sample code to the kTwitterConsumerKey and kTwitterConsumerSecret strings. (see relevant code below).
Step 2: Describe your environment
- Objective C or Swift: Objective C
- iOS version: 11.4
- Firebase SDK version: 5.1.0
- FirebaseUI version: not sure, pod update only downloads:
Using FirebaseAuth (5.0.0)
Using FirebaseCore (5.0.2)
Using FirebaseDatabase (5.0.1)
Using FirebaseFirestore (0.12.2)
Using FirebaseStorage (3.0.0) - CocoaPods Version: 1.5.3
- Xcode Version: 9.4
Step 3: Describe the problem:
The sample code should demonstrate how to implement Twitter authentication without having to bake the Twitter consumer key secret into the code.
Steps to reproduce:
$ git clone https://github.com/firebase/FirebaseUI-iOS.git
$ cd FirebaseUI-iOS
$ pod install
Observed Results:
- Confusion, frustration, time spent.
Expected Results:
- Sample code which is consistent with the documentation.
Relevant Code:
// TODO: Update with Twitter key and secret
NSString *const kTwitterConsumerKey = @"";
NSString *const kTwitterConsumerSecret = @"";
@implementation FUIAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
if (kTwitterConsumerKey.length && kTwitterConsumerSecret.length) {
[[TWTRTwitter sharedInstance] startWithConsumerKey:kTwitterConsumerKey
consumerSecret:kTwitterConsumerSecret];
}