-
Notifications
You must be signed in to change notification settings - Fork 73
Permissions not resolved into Symfony user roles #204
Description
Checklist
- I have looked into the Readme and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
I'm having an issue with the automatic conversion of permissions to roles, which is supposed to happen in \Auth0\Symfony\Models\User::getRoles.
From what I understand I have to assign a role with permissions to my user, and enable RBAC in the API:

In the access token which I'm getting back after authenticating, I can see that the permissions of the role are taken over:
But when I inspect the $permissions variable in \Auth0\Symfony\Models\User::getRoles, then it's always an empty array.
Line 253 in f873d32
| $permissions = $this->data['permissions'] ?? []; |
These are the roles of the logged in user in Symfony:

I'm not sure if it's a bug or not, but at least I can not get more out of the documentation and source code. Any help or clarification would be appreciated 😊
Reproduction
- Create new application & API
- Enable RBAC and adding permissions to the access token in the API's options
- Create a new role and add any permission
- Assign the role to your user
- Log in and check if the assigned roles in
$user->getRoles()containROLE_<YOUR_PERMISSION>
Additional context
No response
jwt-auth-bundle version
Symfony version
7.2.3
PHP version
8.4
