admin icon indicating copy to clipboard operation
admin copied to clipboard

dont show Logout button

Open ViPErCZ opened this issue 1 year ago • 2 comments

When updating to "@api-platform/admin": "^3.4.6" the logout button does not appear. When I'm not logged in, the login page doesn't even show up. The URL goes to the first result and an error appears (because I'm not logged in). Version 3.4.5 is fine.

ViPErCZ avatar Apr 22 '24 13:04 ViPErCZ

I having the same issue in our customer facing admin app. I had to rollback to 3.4.5 but with this old version backend errors are not shown anymore, all the errors appears as "Server communication error". I am adding screen shots below of the missing logout/ login option with the version @api-platform/admin": "^3.4.6". Also it is causing authentication failure. After the auth token gets expired instead of redirecting to the login page it shows empty resource page. Cannot react the login page even by manually inserting the /#/login url in the browser.

Screenshot 2024-04-22 at 19 03 10

AmanAzim avatar Apr 22 '24 17:04 AmanAzim

3.4.6 does not pass auth provider to AdminContext (will be restored in 3.4.7), however returning to contex wrapping Admin component passed in admin prop should fix it, ex.

import { Admin } from "react-admin";
// ...
<HydraAdmin 
  admin={Admin}
  //...

PawelSuwinski avatar Apr 25 '24 20:04 PawelSuwinski

Ok, thanks. This solution works. ;-)

ViPErCZ avatar Apr 28 '24 16:04 ViPErCZ