-
Notifications
You must be signed in to change notification settings - Fork 36
Implement a WebView handler to facilitate broker app installation via the Play Store, Fixes AB#3277229 #2643
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
base: dev
Are you sure you want to change the base?
Conversation
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds handling for broker app installation intents in the WebView client.
- Detects intent:// URLs targeting known broker packages
- Parses and launches intents to install or open the broker app
- Introduces INTENT_PREFIX constant and updates changelog
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
common/src/main/java/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java | Added intent detection (isIntentRequestForBrokerApp ) and processing (processIntentRequestForBrokerApp ) methods |
common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationConstants.java | Defined INTENT_PREFIX constant for intent URI matching |
changelog.txt | Documented the new minor feature |
Comments suppressed due to low confidence (2)
common/src/main/java/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java:45
- Remove the unused PackageHelper import to clean up the code.
import com.microsoft.identity.common.internal.broker.PackageHelper;
common/src/main/java/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java:256
- The new intent-handling branch lacks unit tests. Add tests for matching and non-matching URIs, and for successful and failure paths in processIntentRequestForBrokerApp.
} else if (isIntentRequestForBrokerApp(formattedURL)) {
...ava/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java
Show resolved
Hide resolved
...ava/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java
Outdated
Show resolved
Hide resolved
...ava/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationConstants.java
Show resolved
Hide resolved
…al/AuthenticationConstants.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…/webview/AzureActiveDirectoryWebViewClient.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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 implements a WebView handler to facilitate broker app installation via the Play Store. Key changes include:
- Adding new error string constants for URI syntax errors, missing activities, and unexpected errors.
- Introducing methods to detect and process intent requests for broker app installation in the WebView client.
- Updating authentication constants to include an intent URI prefix.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
common4j/src/main/com/microsoft/identity/common/java/exception/ErrorStrings.java | Added error strings for URI syntax errors, activity not found, and unexpected errors. |
common/src/main/java/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java | Added intent request detection and processing logic for broker app installation. |
common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationConstants.java | Added a new constant (INTENT_PREFIX) to support intent URI handling. |
changelog.txt | Updated with a minor changelog entry for the new feature. |
...ava/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java
Outdated
Show resolved
Hide resolved
...ava/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java
Show resolved
Hide resolved
✅ Work item link check complete. Description contains link AB#3277229 to an Azure Boards work item. |
I'm a little confused. Didn't we already have handling for PlayStore redirects? I see inside AzureActiveDirectoryWebViewClient we have handling for playstore URL. Also before the LTW era (no broker preinstalled), we used to be able to ask for deviceid and this would cause eSTS to ask user to install AuthApp (broker) and IIRC, this would take us to playstore and work fine. Is the issue here that the scheme has changed from market to intent? So essentially this was a regression from server? |
AB#3277229
ON BYOD MFA, there is a flow where users are invited to install the broker app from the Play Store.

This flow is currently broken on WebView as we do not have a handler for this type of URLS.
This PR introduces a handler to facilitate the installation of the broker app via the Play Store