Activities of "liangshiwei"

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

Hi,

Can you provide steps to reproduce? thanks.

Hi,

Your background job should call domain services instead of application services.

Showing 5291 to 5300 of 5950 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11