No Way Of Using Hangfire Dashboard with Token

Dears,
There is no way for using JWT Berear token with Hangfire dashboard
Need Way for that and need it without using cookie

Thanks

Just implement the IDashboardAuthorizationFilter interface and register it with hangfire dashboard:

public void Configure(IApplicationBuilder app, IWebHostEnvironment environment)
{
    [..]
    app.UseHangfireDashboard("/hangfire", new DashboardOptions
    {
        Authorization = new[] { new DashboardAuthorizationFilter() }
    });
    [..]
}

Here is a sample implementation that uses the user has the “HangfireAdmin” role (you can easily adjust it to use a claim):

public class DashboardAuthorizationFilter : IDashboardAuthorizationFilter
{
    public bool Authorize(DashboardContext context)
    {
        var httpContext = context.GetHttpContext();

        return httpContext.User.Identity.IsAuthenticated && httpContext.User.IsInRole("HangfireAdmin");
    }
}

As for how you provide the transport, that has nothing to do with Hangfire: you must add it to the asp.net core hosting yourself (see Introduction to authorization in ASP.NET Core | Microsoft Learn for an introduction).

That being said, if you’re not using a cookie to implement authorization, I don’t know how you intend to do it (you might, however, have a landing page that accepts the access token as a query parameter and sets a session token as a cookie)