This repository was archived by the owner on Dec 13, 2018. It is now read-only.
After authentication fails,the state code of response is still 401 but not 302,it happens when the version of Microsoft.AspNetCore.Authentication.Cookies is above 1.0.0 #1059
Labels
I compared Microsoft.AspNetCore.Authentication.Cookies 1.0.0 and Microsoft.AspNetCore.Authentication.Cookies 1.1.0.I found the ChallengeAsync of AuthenticationHandler,cs makes this difference.
The end of ChallengeAsync 1.0.0 is:
if (!handled && PriorHandler != null) { await PriorHandler.ChallengeAsync(context); }
however the end of ChallengeAsync 1.1.0 is
if (PriorHandler != null) { await PriorHandler.ChallengeAsync(context); }
and in the ChallengeAsync 1.1.0, the await PriorHandler.ChallengeAsync(context); will change the state code of response from 302 to 401.
Is this a bug or I use Microsoft.AspNetCore.Authentication.Cookies 1.1.0 in a wrong way?
The text was updated successfully, but these errors were encountered: