             }
         }
     }
-    
 }
+

    
    var socialAccount: SocialAccount?
    
    var oauthComplete: (() -> Void)?
    
    var afterOAuthAction: ((socialAccount: SocialAccount) -> Void)?
    

                            if isOperatingSystemAtLeastMajorVersion(9) {
                            
                                self.socialAccount = SocialAccount(rawValue: providerName)

                                if #available(iOS 9.0, *) {

                                    guard let accessToken = YepUserDefaults.v1AccessToken.value else {
                                        performSegueWithIdentifier("presentOAuth", sender: providerName)
                                        return
                                    }

                                    let safariViewController = SFSafariViewController(URL: NSURL(string: "\(socialAccount.authURL)?_tkn=\(accessToken)")!)
                                    presentViewController(safariViewController, animated: true, completion: nil)
                                    
                                    oAuthCompleteAction = {
                                        safariViewController.dismissViewControllerAnimated(true, completion: nil)
                                    }

                                } else {
                                    performSegueWithIdentifier("presentOAuth", sender: providerName)
                                }
