Latest 0.2.1
Homepage https://github.com/dkhamsing/DKAuthenticationViewController
License MIT
Platforms ios 8.0, requires ARC
Dependencies DKTwitterReverseAuth
Authors

Simple authentication view controller for iOS using email, password or Twitter (system account picker).

Installation

CocoaPods

platform :ios, '8.0'
pod 'DKAuthenticationViewController'

Manual

Add the files in the DKAuthenticationViewController folder to your project.

Usage

DKAuthenticationViewController *authController = [[DKAuthenticationViewController alloc] init];
authController.twitter = YES; // Optional
authController.cellBackgroundColor = [UIColor lightGrayColor]; // Optional
authController.passwordLength = 5; // Validate password 
authController.successBlock = ^void(id user, BOOL signup) {
    NSLog(@"User %@ in 😎", [email protected]"signed":@"logged");
};

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:authController];
[self presentViewController:navigationController animated:YES completion:nil]; // Should be presented modally with a navigation controller

DKAuthenticationViewController has two properties that use protocols to decouple functionality:

To use a protocol, simply create an object that conforms to it (implements its methods) and assign it as a property to your instance of DKAuthenticationViewController (for DKHudProtocol, you would create an object that implements - hideInView:animationDuration and - showInView:animationDuration).

Demo

  • DKAuthenticationViewController includes a demo project.
  • DKAuthenticationViewController is used in DKParseAuth.

Dependencies

DKAuthenticationViewController uses Apple’s Accounts framework and DKTwitterReverseAuth for Twitter reverse authentication.

Contact

License

DKAuthenticationViewController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "DKAuthenticationViewController",
    "version": "0.2.1",
    "summary": "Simple iOS authentication view controller",
    "homepage": "https://github.com/dkhamsing/DKAuthenticationViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "dkhamsing": "[email protected]"
    },
    "social_media_url": "http://twitter.com/dkhamsing",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/dkhamsing/DKAuthenticationViewController.git",
        "tag": "0.2.1"
    },
    "source_files": "DKAuthenticationViewController/*",
    "requires_arc": true,
    "dependencies": {
        "DKTwitterReverseAuth": [
            "~> 0.1"
        ]
    }
}

Pin It on Pinterest

Share This