Activities of "liangshiwei"

Hi,

If the servers share a common domain, create a cookie on a domain that spans both (e.g. create cookie on domain.com if login is at auth.domain.com and the app at app.domain.com)

Cookies will be set only when the domain and port are the same. e.g . api.domain.com and angular.domain.com. If you cannot use the same domain and port, you need another way

Hi,

You need create an ApiController, just like SampleController

Hi,

We have created internal issue, it will be fix soon.

Can you share some screenshots?

but in reality cookies not saved

Make sure your blazor and HttpApi at same domain and port. it should be work(I have updated example code).

Can I check it remotely? shiwei.liang@volosoft.com

Hi,

Open your <YourProjectName>DbContextModelCreatingExtensions.cs class and use HasIndex to configure your entity.

Example:

builder.Entity<MyTest>(b =>
{
    b.ToTable(qaConsts.DbTablePrefix + "MyTests", qaConsts.DbSchema);
    b.ConfigureByConvention();
    b.Property(x => x.Name).HasColumnName(nameof(MyTest.Name));

    // add this
    // specify name as an index
    b.HasIndex(x => x.Name);
});

Use the add-migration <migration file name> command to add migration file and run the DbMigrator project apply migration.

Hi,

So if you would suggest to switch to the sole Cookies approach:

You can use middleware, like:

app.Use(async (httpContext, func) =>
{
    var token = httpContext.Request.Headers[HeaderNames.Authorization];
    if (!token.IsNullOrEmpty())
    {
        httpContext.Response.Cookies.Append(HeaderNames.Authorization,
            token.ToString().Replace("Bearer ",""),
            new CookieOptions
           {
               Domain = <your parent domain>,
               Path = "/",
               HttpOnly = true,
               SameSite = SameSiteMode.Strict,
               MaxAge = TimeSpan.FromMinutes(60),
               IsEssential = true
           });
    }
    
    if (httpContext.Request.Path.StartsWithSegments("/account/logout"))
    {
        httpContext.Response.Cookies.Delete(HeaderNames.Authorization);
    }
    
    await func.Invoke();
});

does it make sense to use refresh_token instead to get access_token for working with this dashboard

Not recommended, The refresh token should only be used once

4.1 stable version will be released today

See https://github.com/abpframework/abp/pull/6839

try use : dotnet tool install -g volo.abp.suite --version 3.2.1 --add-source https://nuget.abp.io/xxxxxxxxxxxxxx/v3/index.json

Showing 6031 to 6040 of 6692 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 12, 2025, 10:20