From c7807d910a19fb8023f4ed8e7e6bb50f67e247ad Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Wed, 8 Aug 2018 12:53:44 -0400 Subject: [PATCH] Clear Cookies before login in with SSO (#1984) --- app/screens/sso/sso.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/screens/sso/sso.js b/app/screens/sso/sso.js index 2eb19f45d..dbf5f48d8 100644 --- a/app/screens/sso/sso.js +++ b/app/screens/sso/sso.js @@ -94,10 +94,14 @@ class SSO extends PureComponent { } componentDidMount() { - InteractionManager.runAfterInteractions(() => { + InteractionManager.runAfterInteractions(this.clearPreviousCookies); + } + + clearPreviousCookies = () => { + CookieManager.clearAll().then(() => { this.setState({renderWebView: true}); }); - } + }; goToLoadTeam = (expiresAt) => { const {intl, navigator} = this.props; @@ -197,7 +201,7 @@ class SSO extends PureComponent { onLoadEndError = (e) => { console.warn('Failed to set store from local data', e); // eslint-disable-line no-console this.setState({error: e.message}); - } + }; renderLoading = () => { return ;