0

I have an api that is being redirected to with a request with the following format:

https://localhost:4200/test#access_token=....

This is not something that I control and is unfortunately not your standard & query string. As a result when I try to extract the access_token value from the request I cannot find it.

I am using a HttpContext and the Request property:

public override void OnActionExecuting(ActionExecutingContext context)
{
    var request = context.HttpContext.Request; // No properties contain the access_token
}

Are there any other solutions to retrieve the original (un-sanitised) URL that was requested.

Joshua Loader
  • 384
  • 1
  • 5
  • I don't think you can. `#` is not sent to the server (only used by the browser) so you won't be able to get those values. Use query string `?` instead – haldo Nov 22 '19 at 17:16
  • @haldo thanks for the response - there are plenty of things to try however none of them have solved my issue. However, reading the thread I think that it is a problem that cannot easily be solved without additional work - thanks for your help – Joshua Loader Nov 23 '19 at 18:55

0 Answers0