cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API 1

API 1

phunction
Explorer | Level 4
Go to solution

I have an app that is connecting via api (iOS). When they first try to access dropbox, it pops up the sign in/add device etc., all this is fine. 

 

However, my app somehow hangs onto that login. Even if I remove my app and the drop box app, when I re-install my app, it still has access to the old account and does not ask for sign in info again.

How do I stop that?

 

Thanks

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
That's correct, you'd need to offer this as an option in your app for the user to use before uninstalling.

Or, you may be able to handle this programmatically by storing some flag in NSUserDefaults when you link an account, which I believe doesn't persist across re-installs. So, if you don't see the flag, but you do see a stored Dropbox access token, you know the app was uninstalled/reinstalled after linking the account, so you can throw away the access token then.

View solution in original post

4 Replies 4

Greg-DB
Dropbox Staff
Go to solution
If you're using one of the official Dropbox iOS SDKs, the access token is stored in the iOS keychain, which persists across app re-installations.

If you want to clear that, you can do so explicitly. Exactly how you do so depends on which SDK you're using. For example, in the Dropbox iOS Core SDK for API v1, you can do so using DBSession.unlinkUserId or DBSession.unlinkAll.

Also, I should mention that API v1 is deprecated:

https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/

You should migrate to API v2 whenever possible.

phunction
Explorer | Level 4
Go to solution

Thanks, I am planning on updating in the near future, but would like to fix this before then.

 

The question is, how can I call that option if the user simply un-installs the app? I assume I would have to add an option somewhere to unlink the dropbox account?

Greg-DB
Dropbox Staff
Go to solution
That's correct, you'd need to offer this as an option in your app for the user to use before uninstalling.

Or, you may be able to handle this programmatically by storing some flag in NSUserDefaults when you link an account, which I believe doesn't persist across re-installs. So, if you don't see the flag, but you do see a stored Dropbox access token, you know the app was uninstalled/reinstalled after linking the account, so you can throw away the access token then.

phunction
Explorer | Level 4
Go to solution

Alright, thanks for the help.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    phunction Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?