Ctx.state.user undefined in context policy custom plugin

Hi,

It worked. And then, I don’t know what I did, maybe rebuild the Admin UI. But I get a 403 Forbidden even with my token.
I tried to set role permissions to my route :

  • When I authorized Authenticated user with or without “isauthenticated”, I get 403 Forbidden (with my jwt admin token in the header)
  • When I authorized Public user with “isauthenticated” advanced settings, I get 403 Forbidden (with my jwt admin token in the header), and 401 Unauthorized.
  • When I authorize Public user without “isauthenticated”, it’s even worse. I can POST when my jwt is not in the header, but I get 403 forbidden when my jwt is in the header.

My code hasn’t changed since my first question, i just add the solution which worked at first, then I don’t know what happened.