We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
bliss
9 years agoExplorer | Level 3
Login authorisation APIV2
I am usin this metod in-viewdidLoad to authorize loginf rom the login browser controller of dropbox.
[DBClientsManager authorizeFromController:[UIApplication sharedApplication]
controller:self
openURL:^(NSURL *url)
{
[[UIApplication sharedApplication] openURL:url];
}];
but after first time it is approved and when i cam again at the same screen again it appears the Dropbox browser login controller. How i can avoid this once it approve the authorization.
1 Reply
- Greg-DB9 years ago
Dropbox Community Moderator
The app authorization flow will be started whenever you call authorizeFromController. To prevent that from happening repeatedly, you should check if the user is already authorized before calling it. You can use authorizedClient to check that, as shown here:
https://github.com/dropbox/dropbox-sdk-obj-c/blob/003d03898d77052f5958938363be0b98e9088618/Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/ViewController.m#L58
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!