MM-25967 await until cookies are cleared (#4413)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
parent
2b8bba7c24
commit
e6547d7dc1
2 changed files with 6 additions and 5 deletions
|
|
@ -169,7 +169,7 @@ class GlobalEventHandler {
|
|||
resetMomentLocale();
|
||||
|
||||
// TODO: Handle when multi-server support is added
|
||||
CookieManager.clearAll(Platform.OS === 'ios');
|
||||
await CookieManager.clearAll(Platform.OS === 'ios');
|
||||
PushNotifications.clearNotifications();
|
||||
const cacheDir = RNFetchBlob.fs.dirs.CacheDir;
|
||||
const mainPath = cacheDir.split('/').slice(0, -1).join('/');
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import {intlShape} from 'react-intl';
|
|||
import {
|
||||
Dimensions,
|
||||
Image,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
Text,
|
||||
|
|
@ -45,19 +46,19 @@ export default class LoginOptions extends PureComponent {
|
|||
Dimensions.removeEventListener('change', this.orientationDidChange);
|
||||
}
|
||||
|
||||
goToLogin = preventDoubleTap(() => {
|
||||
goToLogin = preventDoubleTap(async () => {
|
||||
const {intl} = this.context;
|
||||
const screen = 'Login';
|
||||
const title = intl.formatMessage({id: 'mobile.routes.login', defaultMessage: 'Login'});
|
||||
CookieManager.clearAll(true);
|
||||
await CookieManager.clearAll(Platform.OS === 'ios');
|
||||
goToScreen(screen, title);
|
||||
});
|
||||
|
||||
goToSSO = (ssoType) => {
|
||||
goToSSO = async (ssoType) => {
|
||||
const {intl} = this.context;
|
||||
const screen = 'SSO';
|
||||
const title = intl.formatMessage({id: 'mobile.routes.sso', defaultMessage: 'Single Sign-On'});
|
||||
CookieManager.clearAll(true);
|
||||
await CookieManager.clearAll(Platform.OS === 'ios');
|
||||
goToScreen(screen, title, {ssoType});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue