Hello,
I have following setup:
-
asp net core app with custom domain set in configuration via openid connect with following code:
.AddOpenIdConnect(OpenIdConnectDefaults.AuthenticationScheme, options =>
{
options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.SignOutScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.ResponseType = OpenIdConnectResponseType.IdToken;
options.CallbackPath = “/”;
options.UsePkce = true;options.Authority = $"https://{configuration["Auth0Domain"]}"; options.ClientId = configuration["Auth0ClientId"]; options.ClientSecret = configuration["Auth0ClientSecret"];
-
auth0 with custom domain in place
-
two custom action wich are assigning roles to users upon login and password reset and use management API to do so
Everything works like a charm except onboarding new users. When user is created and tries to access app for the first time I can see in the Auth0 logs following message: Failed Exchange: Service not enabled within domain: https://mydomain/api/v2/. In both my actions i am creating management API like this:
const management = new ManagementClient({
domain: event.secrets.domain,
clientId: event.secrets.clientId,
clientSecret: event.secrets.clientSecret,
scope: "read:roles",
});
where domain is ‘old’ domain, not custom one. Can you point out what I am doing wrong here?
For old users both login and password change works fine