i have created a new react-application and used Auth0 for the authentication… i set up a user for Username-Password-Authentication… the code i use for login is as follows…
it returns me the id_token no problem, which i got working with the help of other threads in here thanks very much… the access_token it returns is empty from what i can tell… it’s about 30 characters long and does not even register with the debugger, and certainly does not contain any permissions which i need it to. There is a rule in place which returns this information if i log into our original application and i assumed this rule would fire before returning the access_token in the added application as well, but it seems not, and i don’t see any config i missed in the dashboard… I have another user which is older which i can get a successful login with as well using the realm ‘Postgres-User-Store’ but the result is the same, id_token is fine but access_token no good… Can anyone point me in the right direction here?
Cheers
Greg
Updated: i added audience to the client setup and now i get part of what i would be expecting in the access token, but still not the permission metadata
The RBAC settings in the audience API are disabled… There is a rule that executes that loads the permissions into the token in our main app, but it does not seem to execute when i run it the way i am, using the Postgres-User-Store with a username and password… The SSO seemed like overkill in the app i am using this for so i thought this would be an easier solution… Perhaps i am missing a step to request the permissions that i am not aware of?
I just noticed in the logs that whenever i log in with a password an API operation runs for “Update A User” and it blanks my roles and permissions so this could be the culprit… but i am not calling that myself… my code simply calls the login… That API Operation does not appear when i log into the main app with the SSO… but when i do that, permissions and roles reappear for my user… Now i am more confused than before!!
Can you please DM me a HAR file of the transaction so I can investigate further?
I think the problem may be that you are not requesting the permissions with the request. Rules run after successful authentication, which could be causing the problem here.
Hi there, I’m another Dev that works with @greg6, I figured this out, it was the permissions themselves they were scoped for another single page application we have configured.