Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Reinventing Identity and Social Graphs with Digits

Reinventing Identity and Social Graphs with Digits

Increasingly, the phone number is the primary identifier for an individual. In developing markets, it’s the only identifier. Digits is a new way for your users to sign in to their apps and websites without using a password. Simple and safe to use, Digits requires only a phone number. With Friend Finding, Digits is also reinventing social graphs with the one everyone has on their phone: the address book.

Romain Huet

April 24, 2015
Tweet

More Decks by Romain Huet

Other Decks in Technology

Transcript

  1. crashes spam identity dropped frames lag performance threading memory leaks

    churn 
 getting downloads driving installs revenue 
 in-app-purchases revenue monetization user feedback validation distribution support user accounts testing graphics icons deep links localization internationalization data storage persistence analytics content interest graphs stability
  2. crashes spam identity dropped frames lag performance threading memory leaks

    churn 
 getting downloads driving installs revenue 
 in-app-purchases revenue monetization user feedback validation distribution support user accounts testing graphics icons deep links localization internationalization data storage persistence analytics content interest graphs stability
  3. Individuals Using the Internet, 2005-2014 (ITU) People (Millions) 0 750

    1500 2250 3000 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 Internet Users
  4. ¥ $ € £ SMS API SMS Aggregator SMS API

    SMS Aggregator SMS API SMS Aggregator
  5. COST PER MILLION VERIFICATIONS Brazil $50,000 United Kingdom $33,000 Germany

    $60,000 Saudi Arabia $20,000 United States $5,000
  6. INITIALIZE FABRIC import Fabric import TwitterKit @UIApplicationMain class AppDelegate: UIResponder,

    UIApplicationDelegate { func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool { } } Fabric.with([Twitter()]) return true
  7. INVOKE DIGITS import TwitterKit class ViewController: UIViewController { override func

    viewDidLoad() { super.viewDidLoad() } } let authenticateButton = DGTAuthenticateButton(authenticationCompletion: { (session: DGTSession!, error: NSError!) in // Store the Digits session in your backend. }) authenticateButton.center = self.view.center self.view.addSubview(authenticateButton)
  8. DIGITS SESSION let button = DGTAuthenticateButton { (session, error) in

    if session != nil { } } println(session.userID) // “2834242790” println(session.authToken) // “2834242790-5gsoS8ABHybf7SfsWgPXhqmDet843uleJM8hsVa” println(session.authTokenSecret) // “xLDdKyEc1SQDrtyobMWZ14dbnL224e4PKxAeGPu4Ibzew” println(session.phoneNumber) // “+491730001337”
  9. USE YOUR OWN BUTTON import TwitterKit class ViewController: UIViewController {

    @IBAction func didTapButton(sender: AnyObject) { } } Digits.sharedInstance().authenticateWithCompletion { (session, error) in // Inspect the Digits session/error objects. }
  10. THEME YOUR DIGITS EXPERIENCE import TwitterKit class ViewController: UIViewController {

    @IBAction func didTapButton(sender: AnyObject) { } } let digitsAppearance = DGTAppearance() digitsAppearance.backgroundColor = UIColor.blackColor() digitsAppearance.accentColor = UIColor.greenColor() Digits.sharedInstance().authenticateWithDigitsAppearance(digitsAppearance, viewController: nil, title: nil) { (session, error) in // Inspect the Digits session/error objects. }
  11. ADD DIGITS TO YOUR WEB APP <!DOCTYPE html> <html> <head>

    <title>Welcome to Cannonball</title> <meta charset="UTF-8"> </head> <body> <button id="digits-btn">Sign In with Phone</button> <script id="digits-sdk" src="https://cdn.digits.com/1/sdk.js" async></script> </body> </html>
  12. ADD DIGITS TO YOUR WEB APP <script> document.getElementById('digits-sdk').onload = function()

    { }; </script> // Set a click event listener on the button. document.getElementById('digits-btn').addEventListener("click", onLoginButtonClick); // Implement the login button callback and handle the response. function onLoginButtonClick() { Digits.logIn().done(onLogin).fail(onLoginFailure); } // Initialize Digits and check if the user is already logged into Digits. Digits.init({ consumerKey: "o0gzicSS27GgtEJsu7wT442SG" }).done(function() { Digits.getLoginStatus().done(onLoginStatus); });
  13. VERIFY A DIGITS TOKEN & RETRIEVE USER INFO // Parse

    the OAuth Echo headers. var oAuthEchoHeaders = loginResponse.oauth_echo_headers; var verifyData = { credentials: oAuthEchoHeaders['X-Verify-Credentials-Authorization'], apiUrl: oAuthEchoHeaders['X-Auth-Service-Provider'] }; // Post this data and from your server, securely request over SSL
 // the user information including the phone number. $.post('/verify', verifyData).done(function() { // Update the user interface with user information. }); <script> // Validate the authentication and sign the user in. function onLogin(loginResponse) { } </script>
  14. FIND FRIENDS // Initialize the Find Friends button from the

    view. findFriendsButton = (Button) findViewById(R.id.find_your_friends_button); // Set a listener on the Find Friends button. findFriendsButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { // Start uploading the Address Book. Digits.getInstance().getContactsClient().startContactsUpload(); } });
  15. FIND FRIENDS // Retrieve the contact matches. Digits.getInstance().getContactsClient().lookupContactMatches(null, null, new

    ContactsCallback<Contacts>() { }); @Override public void success(Result<Contacts> result) { if (result.data.users != null) { // Process contacts data. } } @Override public void failure(TwitterException exception) { // Show error. }
  16. As we continue to grow internationally, Digits is extremely helpful.

    Many of our customers prefer to verify their accounts via phone, so Digits is the easiest solution for them and us.” “ - Sean Smith,
 Senior Director, Client Engineering, Rdio