Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
dkhamsing edited this page Mar 31, 2015 · 1 revision

The Box Web provider authenticates the user via a web view. It requires client_id and client_secret to be present. Install by adding pod 'SimpleAuth/BoxWeb to your Podfile. Its provider type is box-web.

Box app (mobile) authentication requires setting redirect_uri to boxsdk-YOUR_CLIENT_ID://boxsdkoauth2redirect under OAuth2 Parameters.

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[@"box-web"] = @{
    @"client_id" : @"CLIENT_ID",
    @"client_secret" : @"CLIENT_SECRET"
};
[SimpleAuth authorize:@"box-web" completion:^(id responseObject, NSError *error) {}];
Clone this wiki locally