Open Closed

Configure Authentication & Authorization for Blazor Server Application #6025


User avatar
0
pvala created
  • ABP Framework version: v7.3.2
  • UI Type: Angular & Blazor Server UI
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth Server Separated
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have an application template with EF Core MySQL and Angular. I want the Forms module to be included in my project, but since ABP is not providing UI for Forms in Angular as of now, I want to keep one separate microservice (with Blazor Server) for the Forms module. For that I have created a new microservice in my solution. And there I had the HttpApi.Host project, where Swagger UI is already configured. Here, I integrated the Forms module as a project, and I added the required Razor pages in the HttpApi.Host project of the service along with the required configuration.

But, now I am not sure how exactly I have to configure the authentication and authorization for the Forms Razor pages. Even though I am able to access the pages on the UI, but I can't perform anything because the user is unauthenticated. I have implemented the usual "oidc" authentication, which is as of now working, but authorization is something I'm not sure how to configure. I have granted all the forms permissions to the admin user through Angular UI, but it still says unauthorized. Can you help me with that?


39 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can refer the project I shared.

  • User Avatar
    0
    pvala created

    I am able to run the Swagger UI now, but how do I configure for the Blazor Server project, because there is not blazor project in the example you sent, do I have to look in the Public Web Project?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    The configuration of Blazor server is basically the same as MVC, you can refer to it

  • User Avatar
    0
    pvala created

    But I don't know how to configure the MVC, that's why I am asking you how do I configure that. Do I need to give any dependency of the Forms module anywhere in the blazor project? I am sending you my project via email, in the project I have blazor project named "blazor" in the apps folder, can you check the project and tell me exactly where I need to do the configuration? Thank you.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    HI,

    I make it work, you can check your email.

  • User Avatar
    0
    pvala created

    Hello, this is working fine. Can you tell me what exact configuration you did to make it work? So that I can keep track of it in future.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can use the winmerge to compare them.

  • User Avatar
    0
    pvala created

    Do ABP support Datepicker/calendar in the forms module?

  • User Avatar
    0
    smansuri created

    Hi,

    Where can we find the forms module development integration document.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Do ABP support Datepicker/calendar in the forms module?

    No,

    Where can we find the forms module development integration document.

    See: https://docs.abp.io/en/commercial/latest/modules/forms

  • User Avatar
    0
    pvala created

    Are there any plans of the datepicker/calendar in the Forms modules by ABP?

  • User Avatar
    0
    smansuri created

    Do ABP support Datepicker/calendar in the forms module?

    No,

    Where can we find the forms module development integration document.

    See: https://docs.abp.io/en/commercial/latest/modules/forms

    this above link does not have complete in depth documentation. as you only suggested to install few packages in this thread which are not part of the above document.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I don't know what the complete in-depth documentation means

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Are there any plans of the datepicker/calendar in the Forms modules by ABP?

    We have no plan to do it in the short term

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13