I have a custom AuthorizeAttribute which works great when a user is logged in (and interestingly enough on the production environment) but on my dev machine (using ngrok to handle external requests, a necessary complexity unfortunately) when a new user arrives at a controller method decorated with my CustomAuthorizeAttribute:
- The OnAuthorization() method of the attribute is never reached
- The user is immediately redirected to the wrong URL https://localhost/Account/Login (which is missing the required port)
Im trying to debug this but am a bit out of my depth. Any pointers would be most appreciated.