Skip to content

Development proxy for EasyAuth in Azure Container Apps

License

Notifications You must be signed in to change notification settings

alanta/EasyAuthDevProxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyAuth Dev Proxy for Azure Container Apps

Run your container app with EasyAuth enabled in local development.

About this project

This project was created to scratch an itch: I wanted to run my Azure Container App locally with EasyAuth enabled.

It's a YARP based reverse proxy that intercepts the EasyAuth endpoints to allows logging in locally.

Features

  • Run your container app with EasyAuth enabled in local development
  • Simulate login, similar to what SWA CLI enables for Azure Static WebApps
  • Run your app in a container or dotnet run it (or whatever platform your app runs in)
  • No need to change your app, just point the proxy to your backend

Limitations

  • Credentials are faked and not backed by any identity provider.
  • Only the bare minimum of claims is added to the client identity: username, roles, id, provider.
  • Haven't figured out single-click launch yet, so you need to run it from the command line.
  • Assumes your app allows anonymous access and redirect to login when needed.

Usage

  1. Make sure you have dotnet 8 installed.

  2. Clone this repo.

  3. Start the proxy with the following command in the EasyAuthDevProxy folder:

dotnet run --urls=https://localhost:8888 --backend=https://localhost:7290

The urls parameter is the frontend URL of the proxy that you'll point your browser to. The backend parameter is the URL of your backend app.

  1. Open your browser and navigate to the proxy URL, e.g. https://localhost:8888 in the example above.

When your application redirects to the login page (for example /.auth/login/aad), you'll be presented with a form that allows you to configure the user and roles.

Credits

About

Development proxy for EasyAuth in Azure Container Apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published