Skip to content

Commit 0fa4919

Browse files
committed
fix(rtn-web-browser): Don't use custom tabs on default and fallback to normal tabs
1 parent 9498a68 commit 0fa4919

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/rtn-web-browser/src/apis/openAuthSessionAsync.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ export const openAuthSessionAsync = async (
3737
if (Platform.OS === 'android') {
3838
try {
3939
const isChromebookRes = await isChromebook();
40-
if (isChromebookRes) {
41-
return openAuthSessionChromeOs(httpsUrl, redirectUrls);
40+
if (!isChromebookRes) {
41+
// If it is not a Chromebook, it probably supports custom tabs
42+
return await openAuthSessionAndroid(httpsUrl, redirectUrls);
4243
}
4344
} catch {
4445
// ignore and fallback to android
4546
}
4647

47-
return openAuthSessionAndroid(httpsUrl, redirectUrls);
48+
// The ChromeOS way without custom tabs works everywhere
49+
return openAuthSessionChromeOs(httpsUrl, redirectUrls);
4850
}
4951
};
5052

0 commit comments

Comments
 (0)