From 1529aa22322865d97d5c34ac52d454a62b2346b1 Mon Sep 17 00:00:00 2001 From: Timothy LeBon Date: Wed, 23 Aug 2023 11:30:57 +0200 Subject: [PATCH] fix: android outlook integration [WPB-3493] (#15502) * chore: testing for browser name * fix: add support for android browser * chore: add extra browser names to var --- src/script/auth/module/action/RuntimeAction.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/script/auth/module/action/RuntimeAction.ts b/src/script/auth/module/action/RuntimeAction.ts index e1e4d0c39b4..550dfe74ab1 100644 --- a/src/script/auth/module/action/RuntimeAction.ts +++ b/src/script/auth/module/action/RuntimeAction.ts @@ -30,11 +30,16 @@ import type {ThunkAction} from '../reducer'; export class RuntimeAction { checkSupportedBrowser = (): ThunkAction => { return (dispatch, getState, {getConfig}) => { + const androidBrowser = 'android browser'; + const outlookBrowser = 'unknown'; const isMobileSupportedBrowser = () => { - return Runtime.isMobileOS() && (Runtime.isSafari() || Runtime.isChrome()); + return ( + Runtime.isMobileOS() && + (Runtime.isSafari() || Runtime.isChrome() || Runtime.getBrowserName() === androidBrowser) + ); }; const isOutlookApp = () => { - return Runtime.getBrowserName() === 'unknown'; + return Runtime.getBrowserName() === outlookBrowser; }; const isAuthorizationFlow = () => location?.search?.includes(QUERY_KEY.SCOPE) ?? false; if (