Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Dropbox

dkhamsing edited this page Mar 26, 2015 · 1 revision

The Dropbox Web provider authenticates the user via a web view. It requires client_id and redirect_uri to be present. Install by adding pod 'SimpleAuth/DropboxWeb to your Podfile. Its provider type is dropbox-web.

Dropbox does not respect redirect URIs passed at runtime, so you must provide SimpleAuth with the redirect URI that you provided on https://www.dropbox.com/developers/apps (for in app auth, add http://localhost to redirect URIs).

This provider shows a web view controller by passing it to the block specified by SimpleAuthPresentInterfaceBlockKey. By default, this block wraps the given view controller in a UINavigationController and presents that controller on the topmost presented view controller. Likewise, the controller is dismissed by passing it to the block specified by SimpleAuthDismissInterfaceBlockKey. You can read more about this in Customizing Interface Elements.

Examples

SimpleAuth.configuration[@"dropbox-web"] = @{
    @"client_id" : @"CLIENT_ID",
    @"redirect_uri" : @"REDIRECT_URI"
};
[SimpleAuth authorize:@"dropbox-web" completion:^(id responseObject, NSError *error) {}];
Clone this wiki locally