cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Find out how Tiffany, a Customer Experience superstar uses Dropbox to keep her family in the loop when it comes to her new baby 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

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

Re: API 1

Greg-DB
Dropboxer
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

Re: API 1

Greg-DB
Dropboxer
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.

Re: API 1

phunction
Explorer | Level 4

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?

Re: API 1

Greg-DB
Dropboxer
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

Re: API 1

phunction
Explorer | Level 4

Alright, thanks for the help.

Who's talking

Top contributors to this post

  • User avatar
    phunction Explorer | Level 4
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?