Forum Discussion

rajul_texas's avatar
rajul_texas
Explorer | Level 3
8 years ago
Solved

How to clearStoredAccessToken for tokens that fail migration?

I am using DBClientsManager::checkAndPerformV1TokenMigration to migrate myDropbox Objective-C API v1 access tokens toDropbox Objective-C API v2.

 

As a part of the error handling if a token fails to migrate, I am guessing I should be clearing the stored access token by calling DBOAuthManager::clearStoredAccessToken and prompt the user to acquire a new v2 access token.

 

However this method takes a tokenUid. Since these are v1 tokens I only have access to 

DropboxUserID, AccessToken, AccessTokenSecret and StoredAppKey. How do I clear the access token from the Auth Manager or the Key Chain?

 

Thanks,

Rajul

  • You don't need to clear old tokens that failed to migrate. There's no harm in having them stored. (The clearStoredAccessToken method would only clear tokens for the current SDK, not the old ones, anyway.)
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    You don't need to clear old tokens that failed to migrate. There's no harm in having them stored. (The clearStoredAccessToken method would only clear tokens for the current SDK, not the old ones, anyway.)