{"action":"created","issue":{"url":"https://api.github.com/repos/marmelab/react-admin/issues/1870","repository_url":"https://api.github.com/repos/marmelab/react-admin","labels_url":"https://api.github.com/repos/marmelab/react-admin/issues/1870/labels{/name}","comments_url":"https://api.github.com/repos/marmelab/react-admin/issues/1870/comments","events_url":"https://api.github.com/repos/marmelab/react-admin/issues/1870/events","html_url":"https://github.com/marmelab/react-admin/issues/1870","id":328652742,"node_id":"MDU6SXNzdWUzMjg2NTI3NDI=","number":1870,"title":"Logout problem","user":{"login":"JacquesBonet","id":173393,"node_id":"MDQ6VXNlcjE3MzM5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/173393?v=4","gravatar_id":"","url":"https://api.github.com/users/JacquesBonet","html_url":"https://github.com/JacquesBonet","followers_url":"https://api.github.com/users/JacquesBonet/followers","following_url":"https://api.github.com/users/JacquesBonet/following{/other_user}","gists_url":"https://api.github.com/users/JacquesBonet/gists{/gist_id}","starred_url":"https://api.github.com/users/JacquesBonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacquesBonet/subscriptions","organizations_url":"https://api.github.com/users/JacquesBonet/orgs","repos_url":"https://api.github.com/users/JacquesBonet/repos","events_url":"https://api.github.com/users/JacquesBonet/events{/privacy}","received_events_url":"https://api.github.com/users/JacquesBonet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-01T20:35:59Z","updated_at":"2018-06-01T20:52:04Z","closed_at":null,"author_association":"NONE","body":"Please do not submit support requests or \"How to\" questions here. For that, go to [StackOverflow](http://stackoverflow.com/questions/tagged/react-admin).\r\n\r\n**What you were expecting:**\r\n<!-- Describe what the behavior would be without the bug. -->\r\nA user logout of my react-admin based appication\r\n\r\nThe logout must always success.\r\n**What happened instead:**\r\n<!-- Describe how the bug manifests. -->\r\nA user logout of my react-admin based appication\r\n\r\nThe logout success only after 3 or 4 try\r\n**Steps to reproduce:**\r\n<!--  Please explain the steps required to duplicate the issue, especially if you are able to provide a sample application. -->\r\nIn checking the code on auth.js\r\n\r\n```\r\n            case USER_LOGOUT: {\r\n                yield put(push((action.payload && action.payload.redirectTo) || '/login'))\r\n                yield call(authProvider, AUTH_LOGOUT)\r\n                break\r\n            }\r\n```\r\nI see the code is not on the good sequence.\r\nThe authprovider must be call before the redirect, like that\r\n\r\n``` \r\n           case USER_LOGOUT: {\r\n                yield call(authProvider, AUTH_LOGOUT)\r\n                yield put(push((action.payload && action.payload.redirectTo) || '/login'))\r\n                break\r\n            }\r\n```\r\n**Related code:**\r\n<!-- If you are able to illustrate the bug or feature request with an example, please provide a sample application via one of the following means:\r\n\r\n* CodeSandbox (https://codesandbox.io/s/pw74xww3p0)\r\n* A sample application via GitHub\r\n-->\r\n\r\n```\r\ninsert short code snippets here\r\n```\r\n\r\n**Other information:**\r\n<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. For visual or layout problems, please include images or animated gifs.-->\r\n\r\n**Environment**\r\n\r\n* React-admin version:\r\n* Last version that did not exhibit the issue (if applicable):\r\n* React version:\r\n* Browser:\r\n* Stack trace (in case of a JS error):\r\n"},"comment":{"url":"https://api.github.com/repos/marmelab/react-admin/issues/comments/394005744","html_url":"https://github.com/marmelab/react-admin/issues/1870#issuecomment-394005744","issue_url":"https://api.github.com/repos/marmelab/react-admin/issues/1870","id":394005744,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDAwNTc0NA==","user":{"login":"JacquesBonet","id":173393,"node_id":"MDQ6VXNlcjE3MzM5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/173393?v=4","gravatar_id":"","url":"https://api.github.com/users/JacquesBonet","html_url":"https://github.com/JacquesBonet","followers_url":"https://api.github.com/users/JacquesBonet/followers","following_url":"https://api.github.com/users/JacquesBonet/following{/other_user}","gists_url":"https://api.github.com/users/JacquesBonet/gists{/gist_id}","starred_url":"https://api.github.com/users/JacquesBonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacquesBonet/subscriptions","organizations_url":"https://api.github.com/users/JacquesBonet/orgs","repos_url":"https://api.github.com/users/JacquesBonet/repos","events_url":"https://api.github.com/users/JacquesBonet/events{/privacy}","received_events_url":"https://api.github.com/users/JacquesBonet/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T20:52:04Z","updated_at":"2018-06-01T20:52:04Z","author_association":"NONE","body":"With the modification I propose, I corrected the problem of automatic  reconnection with the remove of the cache credential before the redirect.\r\n\r\nBut now I have a exception on the list controller.\r\n\r\nSo :\r\n* I defined a own redirect function, which do nothing.  \r\n* I do the redirect on the authprovider"}}
{"actor":{"display_login":"JacquesBonet"}}