Name: Lock-Twitter.iOS
Owner: Auth0
Description: Lock for iOS add-on to use Twitter iOS integration
Created: 2015-05-18 20:41:36.0
Updated: 2016-10-26 15:31:19.0
Pushed: 2017-08-09 14:03:27.0
Homepage: https://auth0.com/lock
Size: 104
Language: Objective-C
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Auth0 is an authentication broker that supports social identity providers as well as enterprise identity providers such as Active Directory, LDAP, Google Apps and Salesforce.
Lock-Twitter helps you integrate native Login with Twitter and Lock
iOS 9+
The Lock-Twitter is available through CocoaPods. To install it, simply add the following line to your Podfile:
"Lock-Twitter", "~> 2.0"
Twitter authentication use Reverse Auth to obtain a valid access_token that can be sent to Auth0 Server and validate the user.
First create a new instance of A0TwitterAuthenticator
ring *twitterApiKey = ...
itterAuthenticator *twitter = [A0TwitterAuthenticator newAuthenticationWithConsumerKey:twitterApiKey];
wift
twitterApiKey = ... //Remember to obfuscate your api key
twitter = A0TwitterAuthenticator.newAuthentication(withConsumerKey: twitterApiKey)
and register it with your instance of A0Lock
if native integration is available
ck *lock = ... //Get your instance of A0Lock
[A0TwitterAuthenticator canUseNativeTwitterAuthentication]) {
[lock registerAuthenticators:@[twitter]];
wift
lock = ... //Get your instance of A0Lock
0TwitterAuthenticator.canUseNativeTwitterAuthentication() {
lock.registerAuthenticators([twitter])
For the case when there are more than one twitter account, Lock-Twitter will let the user choose one use an action sheet. Here are the keys you need to add to your Localizable.strings
file
Also when there are no accounts, Lock-Twitter will show an alert with an error that can be customizable with the following keys:
OOL)canUseNativeTwitterAuthentication;
Checks if it twitter native integration is available in the device.
canUse = [A0TwitterAuthenticator canUseNativeTwitterAuthentication];
canUse = A0TwitterAuthenticator.canUseNativeTwitterAuthentication()
0TwitterAuthenticator *)newAuthenticatorWithConsumerKey:(NSString *)key;
Create a new 'A0TwitterAuthenticator' using a Twitter API key for the default twitter connection name.
itterAuthenticator *twitter = [A0TwitterAuthenticator newAuthenticatorWithConsumerKey:@"KEY"];
twitter = A0TwitterAuthenticator.newAuthenticator(withConsumerKey: "KEY")
0TwitterAuthenticator *)newAuthenticatorWithConnectionName:(NSString *)connectionName consumerKey:(NSString *)consumerKey;
Create a new 'A0TwitterAuthenticator' using a Twitter API key and a connection name.
itterAuthenticator *twitter = [A0TwitterAuthenticator newAuthenticatorWithConnectionName:@"my-twitter" consumerKey:@"KEY"];
twitter = A0TwitterAuthenticator.newAuthenticator(withConnectionName: "my-twitter", consumerKey: "KEY")
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
Auth0 helps you to:
Lock-Twitter is available under the MIT license. See the LICENSE file for more info.