     
     func cancel(sender: AnyObject?) {
         dismiss(true, animated: (sender != nil))
+
+        let cancelUrl = NSURL(string: "db-\(DropboxAuthManager.sharedAuthManager.appKey)://2/cancel")!
+        UIApplication.sharedApplication().openURL(cancelUrl)
     }
     
     func dismiss(animated: Bool) {

        return decisionHandler(.Allow)
    }
    
    public var startURL: NSURL? {
        didSet(oldURL) {
            if nil != startURL && nil == oldURL && isViewLoaded() {

import Security

import Foundation
import SystemConfiguration


/// A Dropbox access token
