Merge branch 'master' into reject-username

This commit is contained in:
Kim Gardner
2018-06-01 17:11:56 +01:00
committed by GitHub
2 changed files with 12 additions and 6 deletions
+7 -1
View File
@@ -96,7 +96,13 @@ export const logout = () => async (
_,
{ rest, client, pym, localStorage }
) => {
await rest('/auth', { method: 'DELETE' });
try {
await rest('/auth', { method: 'DELETE' });
} catch (err) {
// We ignore any REST related errors from the delete action, which may/may
// not have had a cookie/token attached to it. The logout action was still
// called, so we still want to cleanup.
}
// Clear the auth data persisted to localStorage.
cleanAuthData(localStorage);