Hi,
I would like to enable HF UI in my application.
I am using auth0. The problem is when I try to log in in auth0 I am redirected to such a page:
Callback URL mismatch.
The provided redirect_uri is not in the list of allowed callback URLs.
Please go to the [Application Settings page] and make sure you are sending a valid callback url from your application.
This is aligned with auth0 configuration I have and this is expected behavior because the redirect_uri is http instead of https:
&redirect_uri=http%3A%2F%2Fapi-
I allow only https urls.
Here is my configuration:
public class Startup
{
//...
public void Configure(IApplicationBuilder app, IHostEnvironment env)
{
//...
app.UseHttpsRedirection();
//...
app.UseEndpoints(endpoints =>
{
//...
AddHangfireDashboardIfConfigured(app, endpoints);
});
}
private void AddHangfireDashboardIfConfigured(IApplicationBuilder app, IEndpointRouteBuilder endpoints)
{
var configuration = app.ApplicationServices.GetService<IGlobalConfiguration>();
if (configuration != null)
{
endpoints.MapHangfireDashboard(HangfireAuthenticationOptions.HangfireDashboardUrl, new DashboardOptions
{
IsReadOnlyFunc = _ =>
{
var authenticationOptions = _configuration
.GetSection(HangfireAuthenticationOptions.Authentication)
.Get<HangfireAuthenticationOptions>() ?? new HangfireAuthenticationOptions();
return authenticationOptions.IsReadonly;
},
}).RequireAuthorization(ApplicationAuthorizationServiceCollectionExtensions.HangfireAuthorizationPolicyName);
}
}
}
Is there any way to force Hangfire UI to use https instead of http?
Hi, I would like to enable HF UI in my application.
I am using auth0. The problem is when I try to log in in auth0 I am redirected to such a page:
This is aligned with auth0 configuration I have and this is expected behavior because the redirect_uri is http instead of https:
I allow only https urls.
Here is my configuration:
Is there any way to force Hangfire UI to use https instead of http?