Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authorizedClient is nil #441

Open
ivanrein opened this issue Dec 23, 2024 · 2 comments
Open

authorizedClient is nil #441

ivanrein opened this issue Dec 23, 2024 · 2 comments

Comments

@ivanrein
Copy link

Hi, my app is using non-scoped Dropbox client (old auth flow).

After my app starts and call to DropboxClientsManager.setupWithAppKey(#APIKEY) is done, I use DropboxClientsManager.authorizedClient != nil to check if the user is signed in.

For some users, authorizedClient often becomes nil and they'll need to sign in again.

  1. Is this bug because I'm using old auth flow? or am I just doing it wrong?
  2. If I change my app to use scoped from dashboard, will it cause my users on old clients to lose access?

Thank you for your help!

@greg-db
Copy link
Contributor

greg-db commented Dec 23, 2024

Migrating your app to use scopes would not disconnect existing users. You can find more information on the migration here.

If you are still using the old authorizeFromController method in particular though, you should migrate to the new authorizeFromControllerV2 method. You can use the authorizeFromControllerV2 method whether or not you have migrated your app to use scopes. If you have not migrated your app to use scopes, you would set the scopeRequest parameter to nil.

If you're still having trouble, I'll be happy to help with any issues you're having with the Dropbox API/SDK, but I'll need some more information. Please reply with:

  • the version number of the SwiftyDropbox SDK you are using
  • the steps to reproduce the issue, including relevant code snippet(s), but don't include any app secret, access or refresh token(s)
  • the full text of any error or unexpected output

@ivanrein
Copy link
Author

hi @greg-db thank you for your response!
I'll try using authorizeFromControllerV2 and see if the problem still occurs for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants