Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async forceSignOut(){
try {
// revokes the refresh token, (and access token for usage with cognito APIs)
await this.requestWithAuth("POST", "/forceSignOut");
} finally {
// removes tokens from localStorage
await Auth.signOut();
}
}
}
signOut = () => {
this.props.context.updateIsAdmin(false)
Auth.signOut()
.catch(err => console.log({ err }))
}
setAvatar = async () => {
signOut() {
Auth.signOut()
.then(data => window.location.reload())
.catch(err => console.log(err));
}
private logout = () => {
Auth.signOut()
.then(data => console.log(data))
.catch(err => console.log(err));
};
}
signOut: function(event) {
Auth.signOut()
.then(data => {
logger.debug('sign out success', data);
AmplifyStore.commit('setUser', null);
this.$router.push('/auth/signIn');
})
.catch(err => logger.error('sign out error', err))
}
}
function signOut() {
Auth.signOut()
.catch(err => console.log('error signing out: ', err))
}
if (user) {
signOut = async () => {
try {
this.setState({ loading: true });
const { navigation } = this.props;
await Auth.signOut();
navigation.navigate('Auth');
} catch (error) {
console.log(error);
}
};
logout() {
Auth.signOut()
.then(() => this.app.getRootNav().setRoot(LoginPage));
}
function logout() {
window.localStorage.removeItem(LOCAL_STORAGE_KEY);
return Auth.signOut();
}
signOut() {
this.googleSignOut();
this.facebookSignOut();
Auth.signOut()
.then(() => this.changeState('signedOut'))
.catch(err => { logger.error(err); this.error(err); });
}