Support authentication for Azure Function Core Tools
Azure Functions has been great, especially the ability to run the Core Tools locally. However, there are often scenarios where you return data depending on the currently authenticated user. This appears to be supported in Azure Functions in Azure now but there are no options within the Core Tools. This would be hugely useful for local development.
This is something we’re looking to enable.
Markus Hajek commented
any update on this? even just a link to a sample that shows how one can workaround this would be helpful?
Matthew Whited commented
Any updates. Kinda an important feature and having to hack in third party solutions is pretty silly.
Chris Haley commented
I can see that adding full support for authentication to the core tools is a major exercise.
Could there be an option to configure the local function host to run some custom middleware on each request, which the developer could write to either 401 a request without the header/cookie they are using, or set the identity in the request context.
I'm sure in the fullness of time, someone will write a suitable nuget package that everyone ends up using, but at least for now, having the flexibility to run something custom would overcome the problem that at the moment, anything relying on user identity cannot be debugged and tested locally.