This repository was archived by the owner on Sep 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
'Not found' when logging out #1
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Porting issue #1644 from react-admin, initially reported by asliwinski
What you were expecting:
To be redirected to login page without errors after pressing Logout button
What happened instead:
'Not found' appears for a fraction of second before the redirection, as soon as the promise from authClient is returned.
Steps to reproduce:
- Clone and install the minimal example app (it's just a few steps of the tutorial + the basic
authClient) - Replace the
node_modules/admin-on-rest/lib/sideEffect/saga/auth.jswith theauth.jsfromsrcof the repo (2 breakpoints added to catch the error):
case USER_LOGOUT: {
debugger;
yield call(authClient, AUTH_LOGOUT);
debugger;
yield put(push('/login'));
break;
}
- run the app, open the console and log out. When it hits the first breakpoint resume script execution to see the error. (Just when I'm testing it right now it went OK at the first attempt and failed at second, which suggests some kind of a race condition).
Before:
After:
Environment
- Admin-on-rest version: 1.4.0
- React version: 16.2.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

