@W-20935841: Bug - P2 - [Android] Login Server Switching Misbehaving #2822
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.
🥁 Ready For Review 🥁
Salesforce Welcome Discovery's "mobile flow" requires the mobile app to access
https://welcome.salesforce.com/discoverywith the/discoverypath plus the query string parametersclient_id,client_versionandcallback_url. An interesting and possibly not supported use case is if app is also configured withhttps://welcome.salesforce.comas a login server that does not have the/discoverypath. This triggers a failed server switch where the authorization URL isn't loaded and the progress indicator keeps spinning.The actual logic change is that up until WSC Disco path was not a consideration for the login server. In this bug, the login server doesn't update since MSDK cannot tell the two WSC URLs are different since they have the same host and prefix.
To resolve this, the URL check now examines the host and path discretely to drive the logic and doesn't use string level comparison for the URL values.
Here's a recording of the new behavior. Note the WSC entry without the required WSC
/discoverysuffix doesn't respect the consumer key validation and allows an app outside the allow list to access WSC. There's noclient_idparameter in that case to drive the server-side logic. Currently, WSC hosts don't have a host naming convention to drive the submission of those parameters which is the purpose of the path. Only the production host has a fixed host name.Screen_recording_20260120_130154.webm