Auth0 Home Blog Docs

Authorization Extension info not added to user token on login immediately after sign up

signup
authorization-extens
login

#1

Hi there,

I am trying to use Auth0 to manage users for a developer portal. I am using the Authorization Extension to add groups and roles to users. Upon sign-up, the user enters an email, password and a group name. The backend makes several calls to Auth0 using the auth0-nodejs library and calls to the Authoziation Extension API:

  • Add user to the Auth0 connections database
  • Create a new group (in Authorization Extension)
  • Add user to group (in Authorization Extension)
  • Add a (predefined) role to the user (in Authorization Extension)

Once this signup process is complete, I want to make a call to Auth0 to get a JWT token for the user, so that I can sign them into our frontend app. In Auth0 I am using a Rule that populates the users login JWT with group and role information from the Authorization Extension.

I am getting an issue where the JWT returned by this login call does not always include the newly created group and role information. It happens about 1 in 3 signup attempts. Manually looking in the Authorization Extension, I can see that the user data has been correctly created. Is this just an issue with synchronization? Has anyone encountered an issue like this before?


#2

After completing the signup process on your back-end what endpoint do you use to authenticate the user (issue the token)? In addition to that, what version of the Authorization extension are you using and is the rule your own custom rule or the one generated by the extension?


#3

@jmangelo after the signup process is complete, I am using the AuthenticationClient (with database authenticator) from the auth0 nodejs library to sign the user in. I am using extension version 2.3 . The rule is the one that is auto-generated by the extension upon configuration.


#4

@jmangelo looking into the node-auth0 library, the Authentication client is calling the /oauth/ro endpoint to sign the user in.


#5