Hi,
I’m trying to ensure that users have a given role automatically added when they register.
Initially, I tried to do this with a “Post User Registration” hook but that never worked. (I don’t have an auth0
object available to me with a management access token in a hook it seems…)
Then, I used the code provided in this FAQ to do it when they first logged in at least, and that worked.
However, the first JWT that gets returned does NOT have the permissions associated to the added role. I noticed people were having the same issue as me in this ticket…. However, I wasn’t super happy with the proposed solution of simply getting more tokens until one has the permissions…
So I’m sorta stuck atm. Does anyone have a way for a user’s JWT to contain the permissions associated with a role in the FIRST login?