DF2 - role_id value is based on Default Role, not on the setting in the User tab


After the login, the user_id returned in the response corresponds to the Default Role, not on the one set up for the specific application.

I think that this is a bug. These are the steps to replicate the issue:

  1. setup two roles: “guest” and “registered”
  2. create an app “test1” and set the default role to “guest”
  3. create a new user and set the role for the “test1” app as “registered”

The problem is that the role_id returned for the user is always “guest”. This is the response:

The problem is that bug is blocking from having more than one role within an application. Any advises on how this can be managed?
The DF version is 2.0.1

Thank you

The reason it show guest when you POST to user/session is because the role is being assessed before the session is established.
If you turn around and to a GET on user/session with your session token (which you just got back) and the api key, the correct role will show.

Thanks Drew

I don’t like the idea of doing more than one api call for a login. Is this in plan to be fixed?
I have already an extended user dataset in a different table, for now I will use that to store the role information.

Thank you again for your reply.

Best regards

In the latest code (2.0.4) I don’t see this behavior any more. Can you confirm?

Hi Drew,

The issue is now fixed

Thank you

1 Like