-
Notifications
You must be signed in to change notification settings - Fork 450
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
Auth.getOAuth2Token() returns null #248
Comments
Have you implemented the app authorization flow as shown in the example Android app included with the SDK?: https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android You should refer to that as an example of how to implement the app authorization flow, which is accomplished via OAuth 2. Your AndroidManifest.xml should be set up as shown here: Specifically, you start the flow by calling You complete the flow by calling Your app can store and re-use the resulting access token for that user, as the example does here: If that's not working for you, please share the steps and specific code to reproduce the issue. |
The problem is with Firefox Android Browser. later I tried the authorization process on Chrome Android browser and it worked perfectly. |
I just tried the authorization flow in the sample app using Firefox to authorize the app and it worked correctly for me. If something isn't working as expected for you, please share:
|
I suspect your case is related to #242 |
@greg-db : I have a token and save shareprefences. After long time I open app again, I upload file with token in shareprefences, but I get error message "invalid_token". I want to ask you: in this sdk, do you have function refresh new token??? Please answer my question. Thank you |
@songtoanht The public Dropbox API doesn't currently use refresh tokens, but Dropbox API access tokens can be revoked at any time by the user or app. If an access token does get revoked, you'd need to throw it away and prompt the user to re-authorize your app if they wish to continue using it. This is issue thread is old and seems to be for a different issue than what you're referring to, so if something isn't working as expected, please open a new issue. |
@greg-db Thank you so much. I want to confirm this issue. Because I saw many sdk to used refresh token to make behavior smoothly for the user. Thank you again |
Hi greg, i'm not quite familiar with kotlin, can you provide once more android java version ? |
fully noted, and thanks |
I am using dropbox-sdk-java v2 for android. If I try to authenticate the flow from browser, I always get NULL. Issues related to this kind of question are #71 and #161 and they are already closed but none helpful.
My manifest looks like:
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:screenOrientation="portrait"
android:launchMode="singleTask"
<intent-filter>
<data android:scheme="db-XXXXXXXXXXXXX"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
The text was updated successfully, but these errors were encountered: