Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangfire Dashboard - Unauthorized response. #19632

Open
1 task done
agustinsilvano opened this issue Apr 26, 2024 · 1 comment
Open
1 task done

Hangfire Dashboard - Unauthorized response. #19632

agustinsilvano opened this issue Apr 26, 2024 · 1 comment

Comments

@agustinsilvano
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description

I was not able to configure the AbpHangfireAuthorizationFilter on the UseAbpHangfireDashboard method.
I read the documentation about the Dashboard setup, I followed all the steps described there but I'm still getting 401 when trying to access to the '/hangfire' path.

Reproduction Steps

  1. Download the code sample.
  2. Configure the database connection.
  3. Run migrations and launch the application.
  4. Login through swagger (using the default abp's admin account)
  5. By having a session logged in(having the corresponding session cookies properly configured), go to the {api_url}/hangfire
  6. You will get a 401 - Unauthorized error.

Question: Is that the expected flow to get access to the dashboard?

Expected behavior

By following the steps described above, the dashboard should be available for the current logged user.

Actual behavior

Is redirecting to a 401 Unauthorized page.

Regression?

No response

Known Workarounds

No response

Version

8.1.1

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

Separate Auth Server

Operation System

macOS

Other information

I've been inspecting the AbpHangfireAuthorizationFilter (and also created a custom Authorization filter) and the information of the user's information is not available in the HttpContext

@agustinsilvano agustinsilvano changed the title Hangfire Dashboard - Unauthorized reponse. Hangfire Dashboard - Unauthorized response. Apr 26, 2024
@maliming
Copy link
Member

hi

Your app only uses JwtBeareras authentication method. Please refer to qa links below:

https://support.abp.io/QA/Questions/5167/Hangfire-Authorization-Problem
https://support.abp.io/QA/Questions/3199/Hangfire-Dashboard-Authorization-is-not-working

@maliming maliming removed the bug label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants