We have been using Auth0 rules for a long time for role-granting purposes. Today some people reported their user accounts are not being successfully granted.
I took a look at the rule definition and an error message is triggered: “auth0 is not defined”, specifically in the line auth0.users.updateAppMetadata(user.user_id, user.app_metadata)
The rule I used is the one from the template “Set roles to a user”.
Is this error related in somehow to the upcoming deprecation policy?
I get this warning as well but i don’t think it is actually causing any issues. You should check your logs with the debugger to see if there’s anything else happening
There is currently an issue with the editor, where it does not recognise the auth0 object from statements as your auth0.users.updateAppMetadata. It does not affect the actual rule, as the object is available at runtime, and this UI issue is now being addressed by engineering. As @luke mentioned, your issue might be elsewhere, so you might want to check the logs or try to replicate the issue to better understand why it is happening.
I’ve just checked the rule and there was a typo I missed yesterday. The malfunctioning rule was my fault :S
As you said, the UI error does not affect the rule.
Thanks a lot for your comments, @luke and @ricardo.batista.
which calls auth0.users.updateAppMetadata(user.user_id, user.app_metadata);. I get a similar error:
“ReferenceError: auth0 is not defined”. Is this still an issue with the editor?
Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.
Wanted to reach out to know if you still require further assistance?