Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,26 @@ static Optional<BrowserService> create() {
* required, since the session intercepts the redirect on its own.
* </li>
* <li><b>A full HTTPS URL</b> (e.g. {@code "https://example.com/callback"}), with a
* verified Universal Link redirect. This requires iOS 17.4 or higher and an
* {@code apple-app-site-association} file hosted on the domain that associates it with the app.
* verified HTTPS redirect. This requires iOS 17.4 or higher and the following setup:
* <ul>
* <li>The <b>Associated Domains</b> capability enabled on an explicit App ID (a wildcard
* App ID cannot carry it), and a provisioning profile that grants it.</li>
* <li>The app's entitlements must declare the domain under the {@code webcredentials}
* service type (e.g. {@code webcredentials:example.com}).</li>
* <li>An {@code apple-app-site-association} file hosted at
* {@code https://example.com/.well-known/apple-app-site-association} (served as
* {@code application/json}, no redirects) containing a {@code webcredentials} section that
* lists the app, e.g. {@code {"webcredentials":{"apps":["TEAMID.bundle.id"]}}}.</li>
* <li>For local development with a development-signed build (where the file is not on
* Apple's CDN), append {@code ?mode=developer} to the entitlement domain and enable
* <i>Settings &gt; Developer &gt; Associated Domains Development</i> on the device.</li>
* </ul>
* </li>
* </ul>
*
* <p><b>iOS Configuration</b>: none for the custom-scheme form; the HTTPS form requires the
* Associated Domains capability and {@code webcredentials} entitlement described above.</p>
*
Comment on lines +124 to +126
* <p>On <b>Android</b> and <b>Desktop</b> the default implementation simply opens the URL in the
* external browser (see {@link #launchExternalBrowser(String)}). On Android the redirect is
* caught by the system through an HTTPS or custom-scheme intent filter declared in the
Expand Down
5 changes: 5 additions & 0 deletions modules/browser/src/main/native/ios/Browser.m
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ void sendAuthResult(NSString *callbackUrl) {
(*env)->ReleaseStringChars(env, jScheme, charsScheme);

NSURL *nsUrl = [NSURL URLWithString:url];
if (nsUrl == nil) {
AttachLog(@"Invalid authentication URL: %@", url);
sendAuthResult(nil);
return;
Comment on lines +143 to +145
}
Comment on lines +142 to +146
Comment on lines +142 to +146

if (@available(iOS 12.0, *)) {
void (^completionHandler)(NSURL * _Nullable, NSError * _Nullable) =
Expand Down
Loading