Base solution for your next web application
Open Closed

Upgrading from v7 to v11 (angular), and authentication doesn't work using identity server #11737


User avatar
0
customreg created

I have a v7 Angular project that uses IdentityServer that I'm to upgrade to 11.4.2. I also see that support for IdentityServer is being dropped in v12.

Anyway -

After getting migrations straightened out, the login for the host loads.

I can step through the code and successfully authenticate in the POST on login method of UiController.

However, when it redirects to index, and GetCurrentLoginInformationsAsync is called from the sessioncache, the credentials are lost.

AbpSession is not set, essentially.

In my logs, I see several issues related to cookies that look like this:


The cookie 'idsrv.session' has set 'SameSite=None' and must also set 'Secure'.
The cookie '.AspNetCore.Identity.Application' has set 'SameSite=None' and must also set 'Secure'.
The cookie 'Identity.External' has set 'SameSite=None' and must also set 'Secure'.

Additionally, I'm seeing this error:


Unable to configure browser refresh script injection on the response. Consider manually adding '<script src="/_framework/aspnetcore-browser-refresh.js"></script>' to the body of the page.


Do these error messages indicate an obvious misconfiguration or misstep on my part? Are there any items I should check?

Thanks in advance for any tips on resolving this issue.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @customreg

    Is your app working in HTTPS or HTTP ? If it is HTTP, could you change it to HTTPS on your local environment and try again ?