-
-
Save vs0uz4/b2bdee6e7bb34f370191fc47e0666078 to your computer and use it in GitHub Desktop.
Handling JWT, Vue JS and token refreshes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Unauthorised from './Unauthorised' | |
export default function() { | |
return { | |
response: function(response) { | |
switch (response.status) { | |
case 401: return Unauthorised.handle(); | |
} | |
return response; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment