$this->tokenStorage->getToken()->getUser() return null #5130
Unanswered
golebiowska
asked this question in
Q&A
Replies: 1 comment
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I wanted to use logic from this example: https://api-platform.com/docs/core/extensions#custom-extension in my app. I have exact same file as CurrentUserExtension.php, but my service works only when I hardcode user id, because it never return a user object from
$this->tokenStorage->getToken()->getUser()
. I read that this can be related to firewall config, but I didn't found any answer how to do it properly. Maybe someone can tell me what am I doing wrong.My security.yaml:
Beta Was this translation helpful? Give feedback.
All reactions