      **/
     public func getAccessToken(_ code: String, result: @escaping (((OAuthToken)?) -> Void)) throws {
         try oauthRequest(Router.token(code: code))?.responseStrava { [weak self] (response: DataResponse<OAuthToken>) in
+            guard let `self` = self else { return }
+            let token = response.result.value
+            self.config?.delegate.set(token)
+            result(token)
+        }
+    }
+    
+    /**
+     Refresh an OAuth token from Strava
+     
+     - Parameter refresh: the refresh token from Strava
+     - Parameter result: a closure to handle the OAuthToken
+     **/
+    public func refreshAccessToken(_ refresh: String, result: @escaping (((OAuthToken)?) -> Void)) throws {
+        try oauthRequest(Router.refresh(code: refresh))?.responseStrava { [weak self] (response: DataResponse<OAuthToken>) in
             guard let `self` = self else { return }
             let token = response.result.value
             self.config?.delegate.set(token)

            "code" : code
        ]
    }
    
    internal var safariViewController: SFSafariViewController?
}


extension StravaClient {
    
    
    
    fileprivate func isConfigured() -> (Bool) {
        return config != nil
    }
    
    fileprivate func checkConfiguration() {
        if !isConfigured() {
            fatalError("Strava client is not configured")
        }
    }
