Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. export function authenticate() {
  2. return dispatch => api.post('/sessions/refresh')
  3. .then((response) => {
  4. setCurrentUser(dispatch, response);
  5. })
  6. .catch(() => {
  7. localStorage.removeItem('token');
  8. window.location = '/login';
  9. });
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement