Hi Alex ,
Yes, you can emulate EasyAuth locally for development. Install Azure Functions Core Tools and run your app locally using func start
. Configure your local.settings.json with "AzureWebJobsSecretStorageType": "files"
. This allows authentication to be stored locally. For full functionality, mock user identities with a tool like IdentityServer. Ensure your app is configured to use the same authentication settings locally and in Azure. Although not an exact replica, this approach allows you to develop and test EasyAuth features locally, enhancing development speed before deploying to Azure for final testing.
Regards,
Saravanan Ganesan.
Way to get App Service EasyAuth (i.e. AuthZ/AuthN) to work locally
Hi, I'd like to look into using EasyAuth for an app, but is there a way to run this functionality locally while developing? It seems like this would only be offered once deployed to Azure, which limits the DX quite a bit in terms of development speed.
3 answers
Sort by: Most helpful
-
Saravanan Ganesan 1,830 Reputation points MVP
2024-01-30T17:00:02.3333333+00:00 -
Grmacjon-MSFT 17,886 Reputation points
2024-02-21T00:03:43.77+00:00 Hello @Alex Gagnon yes this can be done without using azure functions. Here’s a method that uses Docker to run EasyAuth locally that you can try which was found in this blog post This approach allows you to develop and test EasyAuth features locally, enhancing development speed before deploying to Azure for final testing Please remember this is just a suggestion, make sure to review any potential security and privacy implications before choosing this solution.
Best, Grace
-
Grmacjon-MSFT 17,886 Reputation points
2024-03-01T06:31:14.0933333+00:00 @Alex Gagnon I heard back from the engineering team, and they confirmed using EasyAuth in app service locally is not fully supported. so there isn't an official way to achieve this.