Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlocke authored Dec 18, 2023
1 parent 0d6f0ba commit 9c6f62e
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ To facilitate the above authorization flows, you should take the following steps

#### Begin the authorization flow

You can commence the auth flow by calling `authorizeFromController:controller:openURL` method in your application's
You can commence the auth flow by calling `authorizeFromControllerV2:controller:openURL` method in your application's
view controller.

Please ensure that the supplied view controller is the top-most controller, so that the authorization view displays correctly.
Expand All @@ -319,15 +319,6 @@ Please ensure that the supplied view controller is the top-most controller, so t
loadingStatusDelegate:nil
openURL:^(NSURL *url) { [[UIApplication sharedApplication] openURL:url]; }
scopeRequest:scopeRequest];

// Note: this is the DEPRECATED authorization flow that grants a long-lived token.
// If you are still using this, please update your app to use the `authorizeFromControllerV2` call instead.
// See https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens
// [DBClientsManager authorizeFromController:[UIApplication sharedApplication]
// controller:[[self class] topMostController]
// openURL:^(NSURL *url) {
// [[UIApplication sharedApplication] openURL:url];
// }];
}

+ (UIViewController*)topMostController
Expand Down Expand Up @@ -358,14 +349,6 @@ Please ensure that the supplied view controller is the top-most controller, so t
loadingStatusDelegate:nil
openURL:^(NSURL *url) { [[NSWorkspace sharedWorkspace] openURL:url]; }
scopeRequest:scopeRequest];

// Note: this is the DEPRECATED authorization flow that grants a long-lived token.
// If you are still using this, please update your app to use the `authorizeFromControllerDesktopV2` call instead.
// See https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens
// [DBClientsManager authorizeFromControllerDesktop:[NSWorkspace sharedWorkspace]
// controller:self
// openURL:^(NSURL *url){ [[NSWorkspace sharedWorkspace] openURL:url]; }];

}
```

Expand Down Expand Up @@ -992,7 +975,7 @@ For most apps, it is reasonable to assume that only one Dropbox account (and acc

* call `setupWithAppKey`/`setupWithAppKeyDesktop` (or `setupWithTeamAppKey`/`setupWithTeamAppKeyDesktop`) in integrating app's app delegate
* `DBClientsManager` class determines whether any access tokens are stored -- if any exist, one token is arbitrarily chosen to use for the `authorizedClient` / `authorizedTeamClient` shared instance
* if no token is found, client of the SDK should call `authorizeFromController`/`authorizeFromControllerDesktop` to initiate the OAuth flow
* if no token is found, client of the SDK should call `authorizeFromControllerV2`/`authorizeFromControllerDesktopV2` to initiate the OAuth flow
* if auth flow is initiated, client of the SDK should call `handleRedirectURL` (or `handleRedirectURLTeam`) in integrating app's app delegate to handle auth redirect back into the app and store the retrieved access token
* `DBClientsManager` class sets up a `DBUserClient` (or `DBTeamClient`) with the particular network configuration as defined by the `DBTransportDefaultConfig` instance passed in (or a standard configuration, if no config instance was passed when the `setupWith...` method was called)

Expand All @@ -1008,7 +991,7 @@ For some apps, it is necessary to manage more than one Dropbox account (and acce
* call `setupWithAppKey`/`setupWithAppKeyDesktop` (or `setupWithTeamAppKey`/`setupWithTeamAppKeyDesktop`) in integrating app's app delegate
* `DBClientsManager` class determines whether any access tokens are stored -- if any exist, one token is arbitrarily chosen to use for the `authorizedClient` / `authorizedTeamClient` shared instance
* `DBClientsManager` class also populates `authorizedClients` / `authorizedTeamClients` shared dictionary from all tokens stored in keychain, if any exist
* if no token is found, client of the SDK should call `authorizeFromController`/`authorizeFromControllerDesktop` to initiate the OAuth flow
* if no token is found, client of the SDK should call `authorizeFromControllerV2`/`authorizeFromControllerDesktopV2` to initiate the OAuth flow
* if auth flow is initiated, call `handleRedirectURL` (or `handleRedirectURLTeam`) in integrating app's app delegate to handle auth redirect back into the app and store the retrieved access token
* at this point, the app that is integrating with the SDK should persistently save the `tokenUid` from the `DBAccessToken` field of the `DBOAuthResult` object returned from the `handleRedirectURL` (or `handleRedirectURLTeam`) method
* `DBClientsManager` class sets up a `DBUserClient` (or `DBTeamClient`) with the particular network configuration as defined by the `DBTransportDefaultConfig` instance passed in (or a standard configuration, if no config instance was passed when the `setupWith...` method was called) and saves it to the list of authorized clients
Expand Down

0 comments on commit 9c6f62e

Please sign in to comment.