i8beef / HomeAutio.Mqtt.GoogleHome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Authorization failed. These requirements were not met: DenyAnonymousAuthorizationRequirement: Requires an authenticated user.

sognen opened this issue · comments

I keep seeing "Authorization failed. These requirements were not met: DenyAnonymousAuthorizationRequirement: Requires an authenticated user" in the log.

I searched for the error and found that it may be related to the upgrade to .NET 5 #117 . Some more information here that may be relevant dotnet/AspNetCore.Docs#20447

[14:35:27 INF] Request starting HTTP/1.1 GET http://192.168.1.104:5000/google/home - - [14:35:27 INF] Authorization failed. These requirements were not met: DenyAnonymousAuthorizationRequirement: Requires an authenticated user. [14:35:27 INF] AuthenticationScheme: Cookies was challenged. [14:35:27 INF] Request finished HTTP/1.1 GET http://192.168.1.104:5000/google/home - - - 302 0 - 1.8221ms [14:35:27 INF] Request starting HTTP/1.1 GET http://192.168.1.104:5000/google/home/Account/Login?ReturnUrl=%2Fgoogle%2Fhome - - [14:35:27 INF] Executing endpoint 'IdentityServerHost.Quickstart.UI.AccountController.Login (HomeAutio.Mqtt.GoogleHome)' [14:35:27 INF] Route matched with {action = "Login", controller = "Account"}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.IActionResult] Login(System.String) on controller IdentityServerHost.Quickstart.UI.AccountController (HomeAutio.Mqtt.GoogleHome).
[14:35:27 INF] Executing ViewResult, running view Login.
[14:35:27 INF] Executed ViewResult - view Login executed in 2.5773ms.`

Same here. I also have this but it doesn't seem to generate any issue?
I'm using Warning level to avoid useless info message:

google_home    | [15:15:12 INF] Request starting HTTP/1.0 OPTIONS http:/// - -
google_home    | [15:15:12 INF] Authorization failed. These requirements were not met:
google_home    | DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
google_home    | [15:15:12 INF] AuthenticationScheme: Cookies was challenged.
google_home    | [15:15:12 INF] Request finished HTTP/1.0 OPTIONS http:/// - - - 302 0 - 112.9099ms

What actual behavior are you seeing? That warning by itself isn't surprising, its just complaining that you aren't logged in.

Understood. I am getting it also when logged in but it sounds like it's nothing to be worried about.

If you see anything actually acting weird outside the log, definitely say something!