You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
After login page is displayed I waited 15 min or so, then started login by
clicking my previous account shown on the login page.
After successful login I expected that home page be shown.
Actual behavior
Login seemed to proceed fine, but then my app is redirected to /Account/AccessDenied page.
There were 2 issues:
/Account/AccessDenied page doesn't exist, so 404 is returned. Correct path is MicrosoftIdentity/Account/AccessDenied.
If I manually browse to MicrosoftIdentity/Account/AccessDenied page, then I clearly see that I'm authenticated, because instead of login button I see logout button. My app is ASP.NET Core 3.1 razor pages app, and in _LoginPartial.cshtml I check
for authentication with User.Identity.IsAuthenticated property.
Possible solution
Additional context / logs / screenshots
The text was updated successfully, but these errors were encountered:
I found out the issue lies in my code. I was handling OpenID Connect remote failure event, in which I was redirecting to /Account/AccessDenied. Closing this issue.
Which version of Microsoft Identity Web are you using?
Microsoft.Identity.Web 1.8.2
Where is the issue?
Is this a new or an existing app?
The app is in production and I have upgraded to a new version of Microsoft Identity Web
Repro
Expected behavior
After login page is displayed I waited 15 min or so, then started login by
clicking my previous account shown on the login page.
After successful login I expected that home page be shown.
Actual behavior
Login seemed to proceed fine, but then my app is redirected to /Account/AccessDenied page.
There were 2 issues:
for authentication with User.Identity.IsAuthenticated property.
Possible solution
Additional context / logs / screenshots
The text was updated successfully, but these errors were encountered: