Skip to content

#170 - Switch to AnyBrowserMatcher to support bigger list of browsers - #172

Merged
SanderVeer merged 2 commits into
mainfrom
#170-OAuth-browser-support
Jul 3, 2026
Merged

#170 - Switch to AnyBrowserMatcher to support bigger list of browsers#172
SanderVeer merged 2 commits into
mainfrom
#170-OAuth-browser-support

Conversation

@SanderVeer

Copy link
Copy Markdown
Collaborator

Removes old restriction of approved browsers on OAuth as this was preventing users with alternative browsers such as DuckDuckGo and Microsoft Edge from using the application.

Tested to work with a variety of different browsers as long as these support CustomTabs. If not, we fall back to the WebView implementation. This fallback does not work if the IdP itself blocks Webviews from rendering the login page, but this is out of our hands.

@dzolnai dzolnai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I'm a bit unsure if the custom tabs filter is good with the anybrowsermatcher, so I asked copilot for a second set of eyes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Android OAuth/AppAuth integration to remove the restrictive “approved browser” allow-list so users can authenticate with a wider range of Custom Tabs-capable browsers (e.g., Edge, DuckDuckGo), and improves observability around the Custom Tabs vs WebView fallback path.

Changes:

  • Replaces the AppAuth BrowserAllowList matchers with AnyBrowserMatcher to broaden browser compatibility.
  • Adds Timber logging around authorization intent creation, selected browser package, Custom Tabs package discovery, and WebView fallback triggers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
android/app/src/main/java/app/eduroam/geteduroam/oauth/OAuthViewModel.kt Adds diagnostic Timber logs for browser selection, Custom Tabs discovery, and fallback decisions during OAuth initialization.
android/app/src/main/java/app/eduroam/geteduroam/di/assist/AuthenticationAssistant.kt Switches AppAuth browser matcher configuration to AnyBrowserMatcher to remove the previous browser restriction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +97 to +100
Timber.d(
"Authorization intent built, browser package selected by AppAuth: %s",
authorizationIntent.`package` ?: authorizationIntent.component?.packageName ?: "unknown"
)
Comment on lines +110 to +113
Timber.i(
e,
"No browser allowed by AppAuth's BrowserAllowList could be resolved, triggering WebView fallback"
)
Comment on lines +162 to +166
Timber.d(
"Custom Tabs capable packages found: %s",
packagesSupportingCustomTabs.joinToString { it.activityInfo.packageName }
.ifEmpty { "none" }
)
@SanderVeer
SanderVeer merged commit ee45cf4 into main Jul 3, 2026
1 check passed
@SanderVeer
SanderVeer deleted the #170-OAuth-browser-support branch July 3, 2026 13:10
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

Successfully merging this pull request may close these issues.

3 participants