feat: use androidx.browser for AuthenticatorActivity#16766
Open
mykh-hailo wants to merge 1 commit intonextcloud:masterfrom
Open
feat: use androidx.browser for AuthenticatorActivity#16766mykh-hailo wants to merge 1 commit intonextcloud:masterfrom
mykh-hailo wants to merge 1 commit intonextcloud:masterfrom
Conversation
2eac820 to
c965a88
Compare
Contributor
Author
|
@alperozturk96 I'd appreciate it if you provide me any feedback on this PR. |
Signed-off-by: mykh-hailo <kristianderonta0205@gmail.com>
c965a88 to
58a12a8
Compare
alperozturk96
requested changes
Mar 31, 2026
Collaborator
alperozturk96
left a comment
There was a problem hiding this comment.
Hello
Thank you for the PR. This is definitely an improvement.
When I checked the API, I noticed a better alternative: AuthTabIntent.
Can we use this?
Additionally, I noticed that the user still needs to open the app switcher and go back to the app. I couldn’t find a way to eliminate this.
Also, please be aware that it must behave exactly the same as master for the following scenarios:
- User enters the URL to log in for the first time
- User enters the same URL to log in again with different user name
- User enters a different URL to log in for the first time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use Chrome Custom Tabs (
CustomTabsIntent) for login flow v2 instead of opening the default browser withACTION_VIEWandFLAG_ACTIVITY_NEW_TASK. Users stay in the Nextcloud app task while authentication still runs in their default browser engine, and closing the tab returns them to the in-progress login screen without manually switching apps.Closes: #15984
Changes
AuthenticatorActivity: Open the v2 login URL viaCustomTabsIntent(toolbar tinted withR.color.primary, system color scheme, title shown, share disabled for a cleaner UI). Fallback toACTION_VIEWwithoutFLAG_ACTIVITY_NEW_TASKif Custom Tabs cannot be used.androidx.browser:browser(version catalog + app module).CustomTabsServiceso a Custom Tabs provider can be resolved on API 30+.