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

AuthActivity with Firefox's "Tab queue" turned on cancels login flow #242

Open
jalexdev opened this issue Mar 21, 2019 · 5 comments
Open
Labels

Comments

@jalexdev
Copy link

jalexdev commented Mar 21, 2019

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:

  1. Set Firefox as default Browser for Android.
  2. 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).
  3. Invoke SDK's AuthActivity from client app with no Dropbox app installed (to invoke browser flow) which causes AuthActivity to request Android to launch the login flow URL in a web browser which launches the Firefox browser to open the login flow URL.
  4. 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 AuthActivity in client app to show again while also showing a Toast like UI from Firefox to open the queued URL.
  5. User then opens the login flow with the Firefox Tab queue Toast UI which then does show the login flow URL in Firefox now.
  6. When user completes login flow in Firefox the web login flow navigates back to client application.
  7. Client app's AuthActivity when 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

// We somehow returned to this activity without being forwarded
(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.

@greg-db
Copy link
Contributor

greg-db commented Mar 21, 2019

Thanks for the detailed report! It's much appreciated.

I'm bringing this up with the team, though I can't offer a timeline for updating the SDK's auth flow to handle this scenario.

@atulgpt
Copy link

atulgpt commented Jun 5, 2020

@greg-db Any update on this as this issue is also happening in split screen and multiple screen devices?

@greg-db
Copy link
Contributor

greg-db commented Jun 5, 2020

@atulgpt No, unfortunately I don't have an update on this from the team, but I'll share your note about it also happening in split screen and multiple screen devices with them. Thanks!

@atulgpt
Copy link

atulgpt commented Jun 17, 2020

@greg-db Hi Greg any update on above mentioned issue?

@greg-db
Copy link
Contributor

greg-db commented Jun 17, 2020

@atulgpt No, I don't have any news here.

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

No branches or pull requests

4 participants