BEST
DEALS
OF THE
YEAR!
SAVE UP TO $3,000
24 NOV
1 DEC
00 Days
00 Hrs
00 Min
00 Sec
Open Closed

Redirect to Blazor WASM app after login from public site #6595


User avatar
0
Spospisil created
  • ABP Framework version: v7.3.0
  • UI Type: Blazor WASM
  • Database System: EF Core (PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Using a tiered solution architecture generated from ABP, I would like to put a login button on the public web site that when the user successfully logs on will redirect to the Blazor WASM url instead of going back to the public web site as is currently the case with the out of box generated solution from ABP.

How can I accomplish this?


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    You can try:

    Update the Public website's appsettings.json to add RedirectAllowedUrls

      "App": {
        "SelfUrl": "https://localhost:44304",
        "DisablePII": false,
        "RedirectAllowedUrls": "https://localhost:44307" // your blazor website URL
      },
    

    Open the YourProjectNameWebPublicModule to configure the AppUrlOptions

    Configure<AppUrlOptions>(options =>
    {
        options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
        options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"]?.Split(',') ?? Array.Empty<string>()); // add this line
    });
    

    Finally, add the login button to the page

    <a class="btn btn-primary" href="/Account/Login?returnUrl=https://localhost:44307">login to blazor</a>

  • User Avatar
    0
    Spospisil created

    Thank you. That was the solution to my issue.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 20, 2025, 09:12
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.