Skip to content

Commit

Permalink
deleteToken on logout
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilmintacpineda committed Sep 21, 2021
1 parent 1dd6fd4 commit 1274c2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/fluxible/actions/user.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import messaging from '@react-native-firebase/messaging';
import { store, updateStore } from 'fluxible-js';
import { logLogin, logLogout } from 'libs/logging';
import { xhr } from 'libs/xhr';
Expand All @@ -10,6 +11,8 @@ export function login ({ userData, authToken }) {
export function logout () {
logLogout();

messaging().deleteToken();

xhr('/logout', {
method: 'post',
authToken: store.authToken
Expand Down

0 comments on commit 1274c2c

Please sign in to comment.