In Umbraco 8 we used UseOpenIdConnectAuthentication and Owin to set up authentication to Identity Server 4. When doing that, after a successful login, we could always get the current logged-in user through User.Identity from anywhere, whether it was a controller or in the cshtml.
In Umbraco 9 we're setting it up in startup.cs using AddOpenIdConnect under AddAuthentication with the same parameters as in Umbraco 8. Logging in works correctly, but the User.Identity no longer works from everywhere. For example, where in Umbraco 8 we could check User.Identity.IsAuthenticated in the cshtml and it was true, now it's false (even though the user was signed in successfully).
If accessed under a method with an [Authorize] filter it works correctly.
We created a standard Asp Net 5 web app to test the behavior and it works as expected, until
Umbraco 9 with Identity Server 4
In Umbraco 8 we used UseOpenIdConnectAuthentication and Owin to set up authentication to Identity Server 4. When doing that, after a successful login, we could always get the current logged-in user through User.Identity from anywhere, whether it was a controller or in the cshtml.
In Umbraco 9 we're setting it up in startup.cs using AddOpenIdConnect under AddAuthentication with the same parameters as in Umbraco 8. Logging in works correctly, but the User.Identity no longer works from everywhere. For example, where in Umbraco 8 we could check User.Identity.IsAuthenticated in the cshtml and it was true, now it's false (even though the user was signed in successfully).
If accessed under a method with an [Authorize] filter it works correctly.
We created a standard Asp Net 5 web app to test the behavior and it works as expected, until
is added. With that User.Identity.IsAuthenticated is always false after login, even where it shows as true without the AddUmbraco call.
Anyone know what we're doing wrong?
Hi Ruby,
I have the same problem.
Did you find a solution to this?
is working on a reply...