Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

'Not found' when logging out #1

Open
fzaninotto opened this issue Apr 17, 2018 · 0 comments
Open

'Not found' when logging out #1

fzaninotto opened this issue Apr 17, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@fzaninotto
Copy link
Member

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.js with the auth.js from src of 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:

image

After:

image

Environment

  • Admin-on-rest version: 1.4.0
  • React version: 16.2.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant