Skip to content

Commit

Permalink
Edge browser support
Browse files Browse the repository at this point in the history
  • Loading branch information
macos107 committed Jul 31, 2024
1 parent 8d2f1e7 commit d8c1bde
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
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);
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":
^{
return [OIDExternalUserAgentIOSCustomBrowser CustomBrowserEdge];
}
};
BrowserBlock browser = browsers[browserType];
Expand Down

0 comments on commit d8c1bde

Please sign in to comment.