@ -45,4 +45,12 @@ const getUser = async () => {
}
};
export default { setToken, getUser, removeToken, getToken, setUser };
const removeUser = async () => {
try {
await SecureStore.deleteItemAsync(userKey);
} catch (e) {
console.log("Error while removing authToken");
export default { setToken, getUser, removeToken, getToken, setUser, removeUser };
@ -79,6 +79,7 @@ function AccountScreen(props) {
const logout = () => {
setUser(null);
authStorage.removeToken();
authStorage.removeUser();
const activationActions = () => {