This document outlines an iOS authentication architecture pattern called CocoaAuth that is designed to simplify authentication workflows. It discusses three main patterns: 1) Accounts, which defines the model layer for credentials and account management, 2) Auth Controllers, which control authentication flows, and 3) Auth UI, which handles the user interface for authentication. The goal of this pattern is to save developers time by avoiding having to reinvent authentication wheels and providing a consistent user experience.
121. Login View Flow
id <AKAuthHandler> AKAuthController Login UIViewController
beginAuthenticationAttempt
initialize
presentAKLoginViewController:
user authenticated
authControllerAccount:didAuthenticate:
121
122. Authenticated Flow
id <AKAuthHandler> AKAuthController
beginAuthenticationAttempt
authControllerAccount:didAuthenticate:
122
123. Bounce Back Flow
id <AKAuthHandler> AKAuthController Safari App Delegate
beginAuthenticationAttempt
open URL
open URL
user authenticated
authControllerAccount:didAuthenticate:
123