api-platform / admin

A beautiful and fully-featured administration interface builder for hypermedia APIs

Home Page:https://api-platform.com/docs/admin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dont show Logout button

ViPErCZ opened this issue · 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.

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

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}
  //...

Ok, thanks. This solution works. ;-)