Skip to content

Add Microsoft Edge browser constants and deny list support - #1160

Open
subhra-io wants to merge 2 commits into
openid:masterfrom
subhra-io:feature/edge-browser-deny-list-1151
Open

Add Microsoft Edge browser constants and deny list support#1160
subhra-io wants to merge 2 commits into
openid:masterfrom
subhra-io:feature/edge-browser-deny-list-1151

Conversation

@subhra-io

Copy link
Copy Markdown

Summary:

Adds Browsers.Edge constants and VersionedBrowserMatcher.EDGE_CUSTOM_TAB / EDGE_BROWSER matchers, enabling developers to exclude Microsoft Edge from the authorization flow.

This addresses #1151 — Edge on Android intercepts the redirect URI callback and shows a "Stay in Microsoft Edge" prompt, which can leave users stuck on the login page.

Changes:

  • Browsers.java — Added Browsers.Edge inner class with the verified package name (com.microsoft.emmx), SHA-512 signature hash, and custom tab minimum version.
  • VersionedBrowserMatcher.java — Added EDGE_CUSTOM_TAB and EDGE_BROWSER static matchers.
  • EdgeBrowserTest.java — Added 16 unit tests covering constants, matchers, deny list, and allow list scenarios.
  • README.md — Documented the workaround with code examples.
  • edgetest/ — Added an optional device test app for verifying the fix on real hardware.

Usage:

AppAuthConfiguration appAuthConfig = new AppAuthConfiguration.Builder()
    .setBrowserMatcher(new BrowserDenyList(
        VersionedBrowserMatcher.EDGE_CUSTOM_TAB,
        VersionedBrowserMatcher.EDGE_BROWSER))
    .build();

Adds Browsers.Edge with package name, verified signature hash, and
custom tab minimum version. Adds EDGE_CUSTOM_TAB and EDGE_BROWSER
matchers to VersionedBrowserMatcher.

This enables developers to exclude Edge from the authorization flow
using BrowserDenyList, working around the 'Stay in Microsoft Edge'
redirect interception issue on Android.

Includes unit tests and README documentation with usage examples.

Fixes openid#1151
A small test app that:
- Lists all installed browsers with their SHA-512 signature hashes
- Extracts the Edge signing certificate hash for Browsers.Edge
- Verifies the BrowserDenyList correctly excludes Edge

This module is intended for development/testing only.
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.

1 participant