AuthActivity with Firefox's "Tab queue" turned on cancels login flow
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- android, java
- Domain
- authentication, mobile
Research direction
Start in src/main/java/com/dropbox/core/android/AuthActivity.java around onResume() at the referenced line, and trace how the second resume calls authFinished(null) and clears state. Reproduce with Android 7.1.1 and Firefox Tab Queue enabled, then verify that returning from the queued browser login still associates the completed login with the client app instead of treating it as cancelled.
Written by the indexing model from the issue text.
Description
SDK version: 3.0.8
Android Version: 7.1.1 (didn't test on other versions)
On Android, Firefox's Tab Queue feature causes the web browser login flow to not work due to SDK's AuthActivity treating the login flow as cancelled before user runs the login flow.
Repro Steps:
- Set Firefox as default Browser for Android.
- In Firefox go to Settings -> General -> Turn on "Tab queue" (which requires grating access Firefox to draw over apps, Settings link should show in Firefox when turning this on for the first time).
- Invoke SDK's
AuthActivityfrom client app with no Dropbox app installed (to invoke browser flow) which causesAuthActivityto request Android to launch the login flow URL in a web browser which launches the Firefox browser to open the login flow URL. - Due to Firefox's "Tab queue" feature, Firefox opens the login flow URL internally but does NOT show it to the user. Instead it returns right away causing
AuthActivityin client app to show again while also showing a Toast like UI from Firefox to open the queued URL. - User then opens the login flow with the Firefox Tab queue Toast UI which then does show the login flow URL in Firefox now.
- When user completes login flow in Firefox the web login flow navigates back to client application.
- Client app's
AuthActivitywhen navigated back does nothing because the Dropbox SDK has no token associated with the completed login flow.
The reason for having no token in the Dropbox SDK in step 7 is because in Step 4 when Firefox navigates back to the client app, the Dropbox SDK handles this as a cancelled login attempt and wipes its internal state (same would happen if user task switches back to client app while on Login flow in browser). This logic can be seen in https://github.com/dropbox/dropbox-sdk-java/blob/c710ef80f1c2700031baad7c615dc9934162c090/src/main/java/com/dropbox/core/android/AuthActivity.java#L412 (onResume() will be called for the second time when Firefox navigates back to client app while mAuthStateNonce is non null -> authFinished(null))
For now I'm advising users who report this to simply turn off Firefox's "Tab Queue" feature or install Dropbox however it would be ideal if this just worked for users.
- Dominant language
- Java
- Stars
- 627
- Forks
- 463
- Avg merge
- 5m
- Merged PRs (30d)
- 10
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dropbox/dropbox-sdk-java
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dropbox/dropbox-sdk-java#536 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
dropbox/dropbox-sdk-java#560 · 6 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
dropbox/dropbox-sdk-java#550 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
dropbox/dropbox-sdk-java#542 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dropbox/dropbox-sdk-java#535 · 1 comment ·
All issues in dropbox/dropbox-sdk-java
Similar issues
-
area/plugin
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kestra-io/plugin-kestra#190 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/rocketmq-dashboard#5064 ·