E
E
ebaysher2022-01-11 10:10:37
ASP.NET
ebaysher, 2022-01-11 10:10:37

How to save the token in cookies with such an error?

Such an error in the browser console.
61dd2cf7c3177313288968.png

added in config

services.ConfigureApplicationCookie(options =>
            {
                options.Cookie.SameSite = SameSiteMode.Lax;
            });


Is it necessary to change from http to https to solve the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2022-01-11
@ebaysher

Is it necessary to change from http to https to solve the problem?

Yes, it's a browser error, not a server error.
Well, or else you can cut off all the protections in the browser, which I do not advise.
On the prod, it seems like it’s already considered almost mandatory to use https, but locally this is solved by self-signed certificates (dotnet sdk will generate and install them for you with one command)
dotnet dev-certs https

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question