-
Notifications
You must be signed in to change notification settings - Fork 391
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
Optionally support use custom domain button in webview. #2447
Conversation
brandonpage
commented
Aug 10, 2023
•
edited
Loading
edited
- Opt-in regex pattern to specify domains.
- If a valid url is entered via the "Use Custom Domain" button on the login page store it in the server list.
- Open custom domain urls in Chrome (advanced auth) if appropriate.
Tests results forGenerated by 🚫 Danger |
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.java
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.java
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.java
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.java
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.java
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.java
Outdated
Show resolved
Hide resolved
libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/OAuthWebviewHelper.java
Outdated
Show resolved
Hide resolved
if (SalesforceSDKManager.getInstance().shouldInferCustomDomain() && isNewLoginUrl(uri)) { | ||
String host = uri.getHost(); | ||
Pattern customDomainPattern = SalesforceSDKManager.getInstance().getCustomDomainInferencePattern(); | ||
if (host != null && !getLoginUrl().contains(host) && customDomainPattern != null |
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.
Comparing with iOS, should we have a flag like domainUpdated
, or is that achieved by setting the login server which causes getLoginUrl().contains(host)
to be true if you are back here a second time?
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.
getLoginUrl
checks the currently selected login server so it should server the same purpose.
Maybe we should rename the PR from "Fully support use custom domain button in webview" to "Optionally support use custom domain in webview" ;-) |