I’m unable to access permissions on roles for a user that’s logged in with the assigned role that contains permissions from the API application in auth0’s dashboard. I have a regular application and an api in the auth0 dashboard. The only reason I created the api is for the permissions so that I could link permissions to a role. RBAC and permissions toggle buttons are enabled on the API.
I’m using .NET core version 8.0.100 so I did have to adjust the quickstart code slightly. Logging in works just fine and I see data from the oauth provider but I did not see roles or permissions for my user. user_metadata and app_metadata also did not come through until I added an action flow to add roles, user_meta, and app_meta to come through with the login process. How am I supposed to get the permissions to come through?
I’m also confused as to why I even need the custom action flow as I would think the toggle buttons for RBAC and permissions would send that information when the user logs in but I’m not getting it.
This is the login function being used:
[HttpGet("login")]
public async Task Login(string returnUrl = "/")
{
var authenticationProperties = new LoginAuthenticationPropertiesBuilder()
// Indicate here where Auth0 should redirect the user after a login.
// Note that the resulting absolute Uri must be added to the
// **Allowed Callback URLs** settings for the app.
.WithRedirectUri(returnUrl)
.Build();
await HttpContext.ChallengeAsync(
Auth0Constants.AuthenticationScheme,
authenticationProperties
);
}