clear cookies on again trying to login (#4387)

This commit is contained in:
Harshit Khetan 2020-06-08 23:13:22 +05:30 committed by GitHub
parent 841a8e1df2
commit 7b76aba233
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,7 @@ import {
Text,
} from 'react-native';
import Button from 'react-native-button';
import CookieManager from '@react-native-community/cookies';
import {goToScreen} from '@actions/navigation';
import LocalConfig from '@assets/config';
@ -48,7 +49,7 @@ export default class LoginOptions extends PureComponent {
const {intl} = this.context;
const screen = 'Login';
const title = intl.formatMessage({id: 'mobile.routes.login', defaultMessage: 'Login'});
CookieManager.clearAll(true);
goToScreen(screen, title);
});
@ -56,7 +57,7 @@ export default class LoginOptions extends PureComponent {
const {intl} = this.context;
const screen = 'SSO';
const title = intl.formatMessage({id: 'mobile.routes.sso', defaultMessage: 'Single Sign-On'});
CookieManager.clearAll(true);
goToScreen(screen, title, {ssoType});
};