Hey,
As part of our Auth0 deployment we are assigning roles to users on first login which is working great using Rules and the Management API. The problem I’m facing right now is that the new roles don’t take effect until subsequent logins. Ideally we need the roles to become available during the first login.
Looking at this forum other people have tackled this by pushing roles directly into the context.authorization.roles
array which, as far as I understand, should mean that the roles become available in the user’s auth flow immediately.
This doesn’t seem to be the case for us - we’re authenticating users into Moodle specifically and I can see the correct roles if I console.log(context.authorization.roles)
and look at the debug log but a later Auth0 rule still denies my test user access to our Moodle app.
Any ideas as to what I could be missing here?