Open Closed

I can't login via http stream #344


User avatar
0
gvnuysal created
  • ABP Framework version: v3.0.5
  • UI type:MVC
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

If I run it with https, I can login, but when I run it with http, I cannot login. If I use http in appsettings and iis settings, I cannot login. I wonder what I need to do to run it with http://localhost:XXXX.

Thanks.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

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

    Hi,

    Please see https://docs.microsoft.com/en-gb/dotnet/core/compatibility/3.0-3.1#http-browser-samesite-changes-impact-authentication and discuss aspnetcore : https://github.com/dotnet/aspnetcore/issues/14996. This is the default behavior of chrome.

    Update the ConfigureAuthentication method of the **YourProjectName**WebModule class. like:

    context.Services.AddAuthentication()
    .AddIdentityServerAuthentication(options =>
    {
        options.Authority = configuration["AuthServer:Authority"];
        options.RequireHttpsMetadata = false;
        options.ApiName = "qa";
    }) 
    // add this
    .Services.ConfigureApplicationCookie(options =>
    {
        options.Cookie.SameSite = SameSiteMode.Unspecified;
    });
    

    However, recommend you to use https.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    gvnuysal created

    Hi @liangshiwei thanks your answer

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    robb created

    I had this problem today--affected both HTTP and HTTPS in absolute latest version of Chrome

    Firefox was OK but still complained in console warnings about SameSite cookies

    I implemented the above code change as recommended by liangshiwei and it seems to have corrected the problem

    Is the recommended code change a permanent solution or only a temporary workaround?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi @robb@designitcorp.ca, You should use https as the solution, If you really want to use http, you need to check the browser and set the samesite, See https://github.com/IdentityServer/IdentityServer4/issues/4165

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    robb created

    I am using HTTPS

    I still had to make the above code change to get it to work

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.