How to capture header referer before authentication redirect
Trying to capture the referer page so that I can redirect the user back to where they came from. Using identity server 4 in the Razor Pages client web application. When a user goes to a page requiring authorize, they sent to identity server 4, then are redirected back to the authorize page. On that authorize page on the client I am unable to know where the user came from originally in the client app. I have read some solutions that use an authorize filter to save the referer in session before being redirected to identity server 4, but I believe it is an MVC solution. When I tried implementing in Razor Pages, the custom authorize filter doesn't get called before I get redirected to identity server 4. Is there a filter or point in the pipeline in Razor Pages where I can save the referer in session before getting redirected to Identity Server 4?