Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function authenticate() {
- return dispatch => api.post('/sessions/refresh')
- .then((response) => {
- setCurrentUser(dispatch, response);
- })
- .catch(() => {
- localStorage.removeItem('token');
- window.location = '/login';
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement