Open Closed

Steps to add a new Blazor server app to an existing Blazor Server ABP template solution #4849


User avatar
0
ccernat created

Hi, Support Team!

I have a Blazor Server ABP template solution, latest version.

I want to add to this solution another Blazor server application, a standard MS template for Blazor server.

Can you help us with some steps in order to have the new Blazor server project access the Application layer of the ABP template one?

Like: what minimal modules to we need to have the standard MS Blazor template be able to "communicate" with API, what do we have to seed in OpenIdDictApplication table, what changes in appsettings.json of the DbMigrator, or appsettings.json of the new Blazor server project, etc.

Basically all we need is the new Blazor project to just be able to authenticate and access the Application layer of the ABP one.

Thank you very much for your guidance!

Catalin


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

    Hi,

    MS template, are you mean the microservice template? https://docs.abp.io/en/commercial/latest/startup-templates/microservice/index

  • User Avatar
    0
    ccernat created

    Hello, no. I mean Microsoft Standard Blazor Server template. :) Sorry of the confusing abbreviation.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    It's easy to do:

    You can create an openiddict application for the Blazor server app

    https://docs.abp.io/en/commercial/latest/modules/openiddict#application-management

    And get access_token to request API, we have an example:

    https://github.com/abpframework/abp/blob/dev/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs#L97-L150

  • User Avatar
    0
    ccernat created

    Tks alot!

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11