diff --git a/app.json.dist b/app.json.dist index 88243d5..2f7ebb5 100644 --- a/app.json.dist +++ b/app.json.dist @@ -10,7 +10,7 @@ "ios", "android" ], - "version": "0.9.1", + "version": "0.9.2", "orientation": "portrait", "icon": "./assets/images/icon.png", "splash": { diff --git a/src/components/SignOutButton.js b/src/components/SignOutButton.js index 5c9ba30..d095821 100644 --- a/src/components/SignOutButton.js +++ b/src/components/SignOutButton.js @@ -29,10 +29,7 @@ class SignOutButton extends Component { let auth = new Authentication() await auth.logoutFromAuth0() - SecureStore.deleteItemAsync('refreshToken') - this.props.ApplicationStore.reset() - this.props.UserStore.reset() - this.props.EventStore.reset() + this._resetApp() this.props.navigation.navigate('Auth') } @@ -42,6 +39,13 @@ class SignOutButton extends Component { ) } + _resetApp = async () => { + SecureStore.deleteItemAsync('refreshToken') + await this.props.UserStore.signOut() + this.props.ApplicationStore.reset() + this.props.EventStore.reset() + } + render () { return (