From 4cc375dcb0baac0eb2ae09d87d8c09b6a30370d1 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Tue, 3 Dec 2019 13:08:30 -0300 Subject: [PATCH] Fix SSO login on iOS (#3657) --- app/init/global_event_handler.js | 8 +++++++- app/screens/sso/sso.js | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/init/global_event_handler.js b/app/init/global_event_handler.js index d79faf717..e87e033d6 100644 --- a/app/init/global_event_handler.js +++ b/app/init/global_event_handler.js @@ -160,7 +160,13 @@ class GlobalEventHandler { PushNotifications.clearNotifications(); const cacheDir = RNFetchBlob.fs.dirs.CacheDir; const mainPath = cacheDir.split('/').slice(0, -1).join('/'); - await RNFetchBlob.fs.unlink(cacheDir); + + try { + await RNFetchBlob.fs.unlink(cacheDir); + } catch (e) { + console.log('Failed to remove cache folder', e); //eslint-disable-line no-console + } + mattermostBucket.removePreference('cert'); if (Platform.OS === 'ios') { mattermostBucket.removeFile('entities'); diff --git a/app/screens/sso/sso.js b/app/screens/sso/sso.js index d3d08a286..b3e69b9f5 100644 --- a/app/screens/sso/sso.js +++ b/app/screens/sso/sso.js @@ -221,7 +221,6 @@ class SSO extends PureComponent { onLoadEnd={this.onLoadEnd} onMessage={messagingEnabled ? this.onMessage : null} useSharedProcessPool={true} - sharedCookiesEnabled={true} cacheEnabled={false} /> );