Skip to content
Open
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 @@ -1088,6 +1088,10 @@ private BrowserMatcher getBrowserAllowList(ReadableArray androidAllowCustomBrows
browserMatchers.add(VersionedBrowserMatcher.SAMSUNG_CUSTOM_TAB);
break;
}
case "edge": {
browserMatchers.add(VersionedBrowserMatcher.EDGE_CUSTOM_TAB);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run npx react-native run-android I get the following:

error: cannot find symbol browserMatchers.add(VersionedBrowserMatcher.EDGE_CUSTOM_TAB);

As per these docs

However, when I comment this out, and set my default browser to Edge in the Android Emulator, the Example app does successfully open the links in Edge.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks yeah, I don't think Edge is actually an option in AppAuth?

break;
}
}
}
return browserMatchers;
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native-app-auth/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ export type AuthConfiguration = BaseAuthConfiguration & {
usePKCE?: boolean;
warmAndPrefetchChrome?: boolean;
skipCodeExchange?: boolean;
iosCustomBrowser?: 'safari' | 'chrome' | 'opera' | 'firefox';
iosCustomBrowser?: 'safari' | 'chrome' | 'opera' | 'firefox'| 'edge';
androidAllowCustomBrowsers?: (
| 'chrome'
| 'chromeCustomTab'
| 'firefox'
| 'firefoxCustomTab'
| 'samsung'
| 'samsungCustomTab'
| 'edge'
)[];
androidTrustedWebActivity?: boolean;
iosPrefersEphemeralSession?: boolean;
Expand Down
4 changes: 4 additions & 0 deletions packages/react-native-app-auth/ios/RNAppAuth.m
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,10 @@ - (NSString*)getErrorCode: (NSError*) error defaultCode: (NSString *) defaultCod
@"firefox":
^{
return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserFirefox];
},
@"edge":
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the following error when running npx react-native run-ios or when I try to build directly within Xcode: No known class method for selector 'CustomBrowserEdge'

Same here, I was able to confirm that I can open the URLs within the buttons in the Example app in Edge for iOS, but only after commenting this out.

^{
return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserEdge];
}
};
BrowserBlock browser = browsers[browserType];
Expand Down